1. Linux查看操作系统发行版本
# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)
2. 查看操作系统信息:
# 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
3. 看看CPU个数
# grep 'physical id' /proc/cpuinfo | sort -u | wc -l # cat /proc/cpuinfo
5. 查看系统内核
# cat /proc/version Linux version 3.10.0-693.2.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Sep 12 22:26:13 UTC 2017
6. 查看内存信息:
grep MemTotal /proc/meminfo
7. 查看磁盘使用情况:
df -h
8. 查看其它磁盘外设信息:
fdisk -l
9. 查看所有可用块设备的信息:
lsblk
10. 查看所有硬件信息:
dmidecode |more 或:dmesg |more
11. linux查看网卡信息:
ethtool eth0