查看linux系统版本相关信息
2024-10-06 07:59:53
1.查看内核版本:cat /proc/version
A机器
root@debian:~# cat /proc/version
Linux version 3.10.--686 (ty@debian) (gcc version 4.7. (Debian 4.7.-) ) # SMP Sat Sep :: EDT 2016
B机器
[root@bogon ~]# cat /proc/version
Linux version 3.10.-.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8. (Red Hat 4.8.-) (GCC) ) # SMP Thu Nov :: UTC
2.查看发行版本信息 cat /etc/*-release 或 cat /etc/issue
A机器
root@debian:~# cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"
root@debian:~# cat /etc/issue
Debian GNU/Linux \n \
B机器
[root@bogon ~]# cat /etc/*-release
CentOS Linux release 7.6.1810 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7" CentOS Linux release 7.6.1810 (Core)
CentOS Linux release 7.6.1810 (Core)
从上面信息可以分析出
A机器:Debian 7 x86; B机器:CentOS 7 x86_64
最新文章
- Mysql完全手册(笔记一,底层与内置函数)
- web前端历史的总结
- css内容样式属性
- vs.net git版本仓库使用 之解决冲突方法 原创
- Emoji表情符号录入MySQL数据库报错的解决方案(MySQL utf8与utf8mb4区别)
- Pythonj~module
- 6.7 Binder机制
- 02_Spring控制反转案例快速入门
- 《EnterLib PIAB深入剖析》系列博文汇总_转
- PHP中进制之间的互相转换
- VirtualBox的usb支持
- myFocus焦点图插件
- svn小技巧——重定向svn diff
- Android 开发之Matrix图片处理类的使用
- mvc4项目数据库优先的尝试
- MySql与python交互
- spark生成大宽表的parquet性能优化
- js解密
- 1 认识Jquery
- VMWare虚拟机安装 - 学习者系列文章