- Linux查看操作系统发行版本
cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
- 查看操作系统信息:
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
- 看看CPU个数
grep 'physical id' /proc/cpuinfo | sort -u | wc -l
cat /proc/cpuinfo
- 查看系统内核
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
- 查看内存信息:
grep MemTotal /proc/meminfo
- 查看磁盘使用情况:
df -h
- 查看其它磁盘外设信息:
fdisk -l
- 查看所有可用块设备的信息:
lsblk
- 查看所有硬件信息:
dmidecode |more
或:dmesg |more
-
linux查看网卡信息:
ethtool eth0
https://java-er.com/blog/11-linux-command/
来源:51CTO
作者:yuexiaosheng
链接:https://blog.51cto.com/yuexiaosheng/2481070