轉載自:http://blog.csdn.net/lovingprince/article/details/5419032
cat /proc/
cpuinfo
或者vim /proc/
cpuinfo
查看系統資訊
cat /proc/
cpuinfo
-
CPU (i.e. vendor, Mhz, flags like mmx)
cat /proc/interrupts - 中斷
cat /proc/ioports - 裝置IO連接埠
cat /proc/meminfo - 記憶體資訊(i.e. mem used, free, swap size)
cat /proc/partitions - 所有裝置的所有分區
cat /proc/pci - PCI裝置的資訊
cat /proc/swaps - 所有Swap分區的資訊
cat /proc/version - Linux的版本號碼 相當於 uname -r
uname -a - 看系統核心等資訊
查看linux系統版本方法:
cat /etc/redhat-release
cat /etc/issue
cat /proc/version
查看磁碟空間大小:
df -m
cat /etc/issue 查看作業系統版本
cat /etc/inittab 查看啟動項
cat /proc/cpuinfo
查看cpu資訊
uname -a 系統版本
df -h 查硬碟
cat /etc/passwd 查看所有使用者的列表
cat /etc/group 查看使用者組
du -sh 查看當前檔案夾大小
這裡linux下使用dmidecode查看硬體資訊
dmidecode is a tool for dumping a computer''''s DMI (some say
SMBIOS) table contents in a human-readable format. This table
contains a description of the system''''s hardware components, as
well as other useful pieces of information such as serial numbers
and BIOS revision. Thanks to this table, you can retrieve this
information without having to probe for the actual hardware. While
this is a good point in terms of report speed and safeness, this
also makes the presented information possibly unreliable.
dmidecode可以全面的顯示bios、cpu、記憶體等硬體資訊。
查看主板的序號
dmidecode | grep "Serial Number"
顯示實體記憶體塊數
dmidecode |grep -A16 "Memory Device$"
顯示CPU資訊
dmidecode |grep -A42 "Processor"|more
另外:
grep -An (A和n之間也可以有空格) 輸出包含指定字串的行及該行後續的n行
/usr/sbin/dmidecode | grep "Serial
Number"可以讀出電腦的標示號,當然這隻對正規品牌的機器有效,如DELL、HP之類,取出的值和機器上貼的值是對應的,而類似清華同方之流的相容機,基本上讀不出任何有意義的資料。