怎樣獲取Linux的系統(tǒng)和硬件信息
怎樣獲取Linux的系統(tǒng)和硬件信息
linux查看系統(tǒng)的硬件信息,并不像windows那么直觀,那么怎樣獲取Linux的系統(tǒng)和硬件信息呢?下文學(xué)習(xí)啦小編就分享了獲取Linux的系統(tǒng)和硬件信息的方法,希望對(duì)大家有所幫助。
獲取Linux的系統(tǒng)和硬件信息方法
Inxi是一個(gè)可以獲取完整的系統(tǒng)和硬件詳情信息的命令行工具,內(nèi)容包括:
硬件
CPU
磁盤驅(qū)動(dòng)器
Xorg
桌面環(huán)境
內(nèi)核
GCC版本
進(jìn)程
內(nèi)存占用
和其他有用的信息
安裝方法
Inxi在多數(shù)現(xiàn)代GNU/Linux操作系統(tǒng)的默認(rèn)軟件倉(cāng)庫(kù)中。所以,我們可以簡(jiǎn)單地運(yùn)行下列命令安裝。
在基于Debian的發(fā)行版:
sudo apt-get install inxi
在Fedora:
sudo yum install inxi
在基于RHEL的發(fā)行版:
安裝EPEL軟件倉(cāng)庫(kù):
sudo yum install epel-release
然后使用如下命令安裝inxi:
sudo yum install inxi
使用方法
在終端運(yùn)行如下命令可以獲取系統(tǒng)的概況信息。
inxi
示例輸出:
CPU~Dual core Intel Core i3-2350M CPU (-HT-MCP-) clocked at Min:800.000Mhz Max:1200.000Mhz Kernel~3.13.0-45-generic x86_64 Up~6:41 Mem~1537.7/3861.3MB HDD~500.1GB(52.5% used) Procs~183 Client~Shell inxi~1.9.17
當(dāng)然,我們可以獲取一個(gè)特定硬件的詳情信息。比如獲取聲音/音頻硬件詳情信息,可以運(yùn)行如下命令:
inxi -A
示例輸出:
Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel Sound: Advanced Linux Sound Architecture ver: k3.13.0-45-generic
很酷是吧?
同樣的,你可以獲取顯卡的詳情信息。
inxi -G
示例輸出:
Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.3.0
硬盤信息呢?也是可以的。運(yùn)行如下命令來獲取完整的硬盤信息。
inxi -D
示例輸出:
Drives: HDD Total Size: 500.1GB (52.5% used) 1: id: /dev/sda model: ST9601325BD size: 500.1GB
顯示Bios和主板詳情信息:
inxi -M
示例輸出:
Machine: System: Dell (portable) product: Inspiron N5050 Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012
不僅是硬性詳情信息,它也可以顯示我們系統(tǒng)中的可用軟件倉(cāng)庫(kù)列表。
inxi -r
示例輸出:
Repos: Active apt sources in file: /etc/apt/sources.list deb http://ubuntu.excellmedia.net/archive/ trusty main restricted deb-src http://ubuntu.excellmedia.net/archive/ trusty main restricted deb http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted deb-src http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted deb http://ubuntu.excellmedia.net/archive/ trusty universe . . Active apt sources in file: /etc/apt/sources.list.d/intellinuxgraphics.list deb https://download.01.org/gfx/ubuntu/14.04/main trusty main #Intel Graphics drivers Active apt sources in file: /etc/apt/sources.list.d/linrunner-tlp-trusty.list Active apt sources in file: /etc/apt/sources.list.d/wseverin-ppa-trusty.list deb http://ppa.launchpad.net/wseverin/ppa/ubuntu trusty main
Inxi還可以顯示你所在位置的天氣信息。感到意外嗎?是的,它可以。
inxi -W Erode,Tamilnadu
這里Erode是地區(qū),Tamilnadu是印度的一個(gè)邦。
示例輸出:
Weather: Conditions: 79 F (26 C) - Clear Time: February 4, 6:00 PM IST
查看完整的硬件詳情信息
厭倦了逐一獲取每種硬件的信息?你可以使用如下命令將所有信息一次列出:
inxi -F
示例輸出:
System: Host: sk Kernel: 3.13.0-45-generic x86_64 (64 bit) Desktop: LXDE (Openbox 3.5.2) Distro: Ubuntu 14.04 trustyMachine: System: Dell (portable) product: Inspiron N5050 Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012CPU: Dual core Intel Core i3-2350M CPU (-HT-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) Clock Speeds: 1: 800.00 MHz 2: 1000.00 MHz 3: 800.00 MHz 4: 800.00 MHzGraphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.3.0Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel Sound: Advanced Linux Sound Architecture ver: k3.13.0-45-genericNetwork: Card-1: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) driver: ath9k IF: wlan0 state: up mac: Card-2: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet controller driver: r8169 IF: eth0 state: down mac: Drives: HDD Total Size: 500.1GB (52.5% used) 1: id: /dev/sda model: ST9500325AS size: 500.1GB Partition: ID: / size: 455G used: 245G (57%) fs: ext4 ID: /boot size: 236M used: 159M (72%) fs: ext2 ID: swap-1 size: 4.19GB used: 0.00GB (0%) fs: swap RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module presentSensors: System Temperatures: cpu: 64.5C mobo: N/A Fan Speeds (in rpm): cpu: N/A Info: Processes: 186 Uptime: 6:52 Memory: 1547.2/3861.3MB Client: Shell (bash) inxi: 1.9.17
就像上面你看到的那樣,inxi顯示出了完整的硬件詳情信息。
更多的細(xì)節(jié)可以參考man手冊(cè)。
man inxi
怎樣獲取Linux的系統(tǒng)和硬件信息相關(guān)文章: