Linux 简单命令查询CPU、内存、网卡等信息
看CPU信息(型号)
# cat /proc/cpuinfo | grep name | cut -f2 -d: |uniq -c
1 Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz
# cat /proc/cpuinfo | grep name | cut -f2 -d: |uniq -c
1 Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz
(看到有1个逻辑CPU, 也知道了CPU型号)
# getconf LONG_BIT
32
# getconf LONG_BIT
32
(说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)
# cat /proc/cpuinfo | grep flags | grep 'lm' | wc -l
0
# cat /proc/cpuinfo | grep flags | grep 'lm' | wc -l
0
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
查看内存信息
# cat /proc/meminfo
# uname -a
Linux EHEL4-A.localdomain 2.6.9-5.EL #1 Wed Jan 5 19:22:18 EST 2005 i686 i686 i386 GNU/Linux
# cat /proc/meminfo
# uname -a
Linux EHEL4-A.localdomain 2.6.9-5.EL #1 Wed Jan 5 19:22:18 EST 2005 i686 i686 i386 GNU/Linux
(查看当前操作系统内核信息)
# cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant)
# cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant)
(查看当前操作系统发行版信息)
查看网卡信息
# dmesg | grep -i eth (ethtool eth0)
查看网卡信息
# dmesg | grep -i eth (ethtool eth0)
每天一小步,人生一大步!Good luck~