CentOS 7 檢視系統版本及位數
阿新 • • 發佈:2018-12-27
辨識標準
首先要清楚什麼樣標識是32位的,什麼樣的是64位的。
PC server X86 系列
I386--I686 都是32位
x86_64 是 64位
命令實在是不要太多,為了防止選擇性障礙,一致選擇第一種方式,後面的僅作為補充。
方法1:
[[email protected] bob]# uname -a
Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
方法2:顯示系統程式資訊
[[email protected] bob]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=c5ad78cfc1de12b9bb6829207cececb990b3e987, stripped
方法3:
[[email protected] bob]# cat /proc/version
Linux version 3.10.0-862.el7.x86_64 ([email protected] ) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Fri Apr 20 16:44:24 UTC 2018
檢視系統版本
方法1:
[[email protected] bob]# cat /etc/os-release 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"
方法3:
[[email protected] bob]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
方法4:
[[email protected] bob]# rpm -q centos-release
centos-release-7-5.1804.el7.centos.x86_64
檢視核心版本
方法1:
[[email protected] bob]# cat /proc/version
Linux version 3.10.0-862.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC) ) #1 SMP Fri Apr 20 16:44:24 UTC 2018
方法2:
[[email protected] bob]# uname -a
Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux