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 查看啓動項
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之類,取出的值和機器上貼的值是對應的,而類似清華同方之流的兼容機,基本上讀不出任何有意義的數據