咱們已經展現了一些不一樣的應用程序和方法來獲取Linux的系統和硬件信息。在這一系列裏,咱們將看到如何使用inxi來獲取這些詳情信息。在論壇技術支持中,它能夠做爲調試工具,迅速肯定用戶的系統配置和硬件信息。html
Inxi是一個能夠獲取完整的系統和硬件詳情信息的命令行工具,內容包括:linux
Inxi在多數現代GNU/Linux操做系統的默認軟件倉庫中。因此咱們能夠簡單地運行下列命令安裝。ios
在基於Debian的發行版:git
sudo apt-get install inxi
在Fedora:github
sudo yum install inxi
在基於RHEL的發行版:ubuntu
安裝EPEL軟件倉庫:bash
sudo yum install epel-release
而後使用以下命令安裝inxi:微信
sudo yum install inxi
在終端運行以下命令能夠獲取系統的概況信息。less
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
固然,咱們能夠獲取一個特定硬件的詳情信息。好比獲取聲音/音頻硬件詳情信息,能夠運行以下命令:
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
硬盤信息呢?也是能夠的。運行以下命令來獲取完整的硬盤信息。
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
不只是硬性詳情信息,它也能夠顯示咱們系統中的可用軟件倉庫列表。
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是地區,Tamilnadu是印度的一個邦。
示例輸出:
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 trusty Machine: System: Dell (portable) product: Inspiron N5050 Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012 CPU: 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 MHz 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 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 Network: 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 present Sensors: 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顯示出了完整的硬件詳情信息。
更多的細節能夠參考man手冊。
man inxi
你在尋找一個能夠顯示完整的系統和硬件詳情信息的簡單工具嗎?那麼不用再找了,inxi會提供你所須要的。而且,它仍是在你係統默認的軟件倉庫中的輕量級工具。你還想要更多東西嗎?試一試它,你不會失望。
歡呼吧!
via: http://www.unixmen.com/inxi-f...
付費解決 Windows、Linux、Shell、C、C++、AHK、Python、JavaScript、Lua 等領域相關問題,靈活訂價,歡迎諮詢,微信 ly50247。