Linux查看硬件系统信息快速版

#查看hostname

hostname

#查看IP

hostname -I

#查看序列号

dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product|Serial"

#查看外部IP

curl -s ipecho.net/plain;echo

#查看当前DNS

cat /etc/resolv.conf | sed '1 d' | awk '{print $2}'

#查看uptime

uptime | awk '{print $3,$4}' | cut -f1 -d,

##查看内核版本

cat /proc/version

##查看发行版本

cat /etc/redhat-release

##硬件信息
##查看型号和主频

cat /proc/cpuinfo | grep 'model name'  | cut -f2 -d: | head -n1 | sed 's/^ //'

##查看CPU是几核的

cat /proc/cpuinfo |grep "cores"|uniq

##查看物理核数

扫描二维码关注公众号,回复: 6055700 查看本文章
cat /proc/cpuinfo | grep 'physical id' | sort | uniq | wc -l

##查看逻辑核数

cat /proc/cpuinfo | grep 'model name'  | wc -l

##查看内存总量

cat /proc/meminfo | grep "MemTotal"

##查看支持的最大内存容量

dmidecode -t 16 | grep "Maximum Capacity"

##查看总共内存槽数

dmidecode|grep -A5 "Memory Device"|grep Size|grep -cv Range

##查看已插内存条情况

dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range | grep -v "No Module Installed"

##查看硬盘相关信息

df -Th

猜你喜欢

转载自blog.csdn.net/timonium/article/details/89205333