Linux 查詢系統信息

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 ([email protected]) (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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章