1. Linux查看操作系统发行版本

cat /etc/redhat-release

CentOS Linux release 7.4.1708 (Core)

  1. 查看操作系统信息:

uname -a

 
Linux iz2ze9n3z2fl9zj9hrv58vz 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  1. 看看CPU个数

grep 'physical id' /proc/cpuinfo | sort -u | wc -l

 

cat /proc/cpuinfo

  1. 查看系统内核

cat /proc/version

 
Linux version 3.10.0-693.2.2.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Sep 12 22:26:13 UTC 2017

  1. 查看内存信息:

grep MemTotal /proc/meminfo

  1. 查看磁盘使用情况:

df -h

  1. 查看其它磁盘外设信息:

fdisk -l

  1. 查看所有可用块设备的信息:

lsblk

  1. 查看所有硬件信息:

dmidecode |more
或:dmesg |more

  1. linux查看网卡信息:

    ethtool eth0
    https://java-er.com/blog/11-linux-command/