1 查询当前系统内核信息:
# uname -a
Linux my 4.11.0-22.el7a.aarch64 #1 SMP Sun Sep 3 ... aarch64 aarch64 aarch64 GNU/Linux
也可以使用如下命令,来逐个分析
# uname --help
Usage: uname [OPTION]...
Print certain system information. With no OPTION, same as -s.
-a, --all print all information, in the following order,
except omit -p and -i if unknown:
-s, --kernel-name print the kernel name
-n, --nodename print the network node hostname
-r, --kernel-release print the kernel release
-v, --kernel-version print the kernel version
-m, --machine print the machine hardware name
-p, --processor print the processor type or "unknown"
-i, --hardware-platform print the hardware platform or "unknown"
-o, --operating-system print the operating system
--help display this help and exit
--version output version information and exit
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'uname invocation'
2 查询操作系统版本信息:
# cat /proc/version
Linux version 4.11.0-22.el7a.aarch64 (mockbuild@apmb0.centos.lab) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) ...
表明该操作系统为 Red Hat 4.8.5-16 。
3 查询cpu相关信息
# cat /proc/cpuinfo
processor : 0
BogoMIPS : 30.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid asimdrdm
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xc00
CPU revision : 1
4 查询CentOS版本号
# rpm -q centos-release
centos-release-7-5.1804.el7.centos.x86_64
5 查询当前操作系统发行信息
cat /etc/issue 或 cat /etc/centos-release