1.查看内核
[root@localhost etc]# uname -aLinux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost etc]# uname -r3.10.0-514.el7.x86_64
[root@localhost etc]# cat /proc/version Linux version 3.10.0-514.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Nov 22 16:42:41 UTC 20162.查看发行版信息
[root@lvs-slave ~]# cat /etc/issue
CentOS release 6.7 (Final)Kernel \r on an \m
[root@localhost etc]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)
[root@localhost etc]# cat /etc/os-release |grep VERSIONVERSION="7 (Core)"VERSION_ID="7"CENTOS_MANTISBT_PROJECT_VERSION="7"REDHAT_SUPPORT_PRODUCT_VERSION="7"
[root@localhost etc]# lsb_release -a 前提是安装这个命令,yum install redhat-lsb,安装包很多,将近80MLSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarchDistributor ID: CentOSDescription: CentOS Linux release 7.3.1611 (Core) Release: 7.3.1611Codename: Core3.查看cpu信息
[root@localhost etc]# cat /proc/cpuinfo 4.查看是64位还是32位[root@localhost etc]# getconf LONG_BIT64
[root@localhost etc]# 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]=3d705971a4c4544545cb78fd890d27bf792af6d4, stripped
转载于:https://www.cnblogs.com/fanren224/p/8457216.html