查看linux的硬體設定資訊

來源:互聯網
上載者:User

轉載自: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之類,取出的值和機器上貼的值是對應的,而類似清華同方之流的相容機,基本上讀不出任何有意義的資料。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.