shaoqin 发表于 2019-2-17 06:05:11

centos7版本信息查看

  ##查看系统版本
方法1
$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
方法2
$ lsb_release -a
-bash: lsb_release: command not found
$ 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"
##查看Linux系统32位or 64位
# uname –m
x86_64            //64位系统
i386/i686         //32位系统
##查看Linux系统的内核版本
# uname –r
2.6.32-504.e16.x86_64
##查看Linux系统全部信息
# uname -a
Linux moban 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
##显示系统程序信息
$ 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=3d705971a4c4544545cb78fd890d27bf792af6d4, stripped



页: [1]
查看完整版本: centos7版本信息查看