Inxi:获取Linux的系统和硬件信息

系统 Linux
我们已经展示了一些不同的应用程序和方法来获取Linux的系统和硬件信息。在这一系列里,我们将看到如何使用inxi来获取这些详情信息。在论坛技术支持中,它可以作为调试工具,迅速确定用户的系统配置和硬件信息。

我们已经展示了一些不同的应用程序和方法来获取Linux的系统和硬件信息。在这一系列里,我们将看到如何使用inxi来获取这些详情信息。在论坛技术支持中,它可以作为调试工具,迅速确定用户的系统配置和硬件信息。

[[134902]]

Inxi是一个可以获取完整的系统和硬件详情信息的命令行工具,内容包括:

  • 硬件
  • CPU
  • 磁盘驱动器
  • Xorg
  • 桌面环境
  • 内核
  • GCC版本
  • 进程
  • 内存占用
  • 和其他有用的信息 

安装方法

Inxi在多数现代GNU/Linux操作系统的默认软件仓库中。所以,我们可以简单地运行下列命令安装。

在基于Debian的发行版:

  1. sudo apt-get install inxi

在Fedora:

  1. sudo yum install inxi

在基于RHEL的发行版:

安装EPEL软件仓库:

  1. sudo yum install epel-release

然后使用如下命令安装inxi:

  1. sudo yum install inxi

使用方法

在终端运行如下命令可以获取系统的概况信息。

  1. inxi

示例输出:

  1. 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

当然,我们可以获取一个特定硬件的详情信息。比如获取声音/音频硬件详情信息,可以运行如下命令:

  1. inxi -A

示例输出:

  1. Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel
  2. Sound: Advanced Linux Sound Architecture ver: k3.13.0-45-generic

很酷是吧?

同样的,你可以获取显卡的详情信息。

  1. inxi -G

示例输出:

  1. Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller
  2. X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz
  3. GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.3.0

硬盘信息呢?也是可以的。运行如下命令来获取完整的硬盘信息。

  1. inxi -D

示例输出:

  1. Drives: HDD Total Size: 500.1GB (52.5% used) 1: id: /dev/sda model: ST9601325BD size: 500.1GB

显示Bios和主板详情信息:

  1. inxi -M

示例输出:

  1. Machine: System: Dell (portable) product: Inspiron N5050
  2. Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012

不仅是硬性详情信息,它也可以显示我们系统中的可用软件仓库列表

  1. inxi -r

示例输出:

  1. Repos: Active apt sources in file: /etc/apt/sources.list
  2. deb http://ubuntu.excellmedia.net/archive/ trusty main restricted
  3. deb-src http://ubuntu.excellmedia.net/archive/ trusty main restricted
  4. deb http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted
  5. deb-src http://ubuntu.excellmedia.net/archive/ trusty-updates main restricted
  6. deb http://ubuntu.excellmedia.net/archive/ trusty universe
  7. .
  8. .
  9. Active apt sources in file: /etc/apt/sources.list.d/intellinuxgraphics.list
  10. deb https://download.01.org/gfx/ubuntu/14.04/main trusty main #Intel Graphics drivers
  11. Active apt sources in file: /etc/apt/sources.list.d/linrunner-tlp-trusty.list
  12. Active apt sources in file: /etc/apt/sources.list.d/wseverin-ppa-trusty.list
  13. deb http://ppa.launchpad.net/wseverin/ppa/ubuntu trusty main

Inxi还可以显示你所在位置的天气信息。感到意外吗?是的,它可以。

  1. inxi -W Erode,Tamilnadu

这里Erode是地区,Tamilnadu是印度的一个邦。

示例输出:

  1. Weather: Conditions: 79 F (26 C) - Clear Time: February 4, 6:00 PM IST

查看完整的硬件详情信息

厌倦了逐一获取每种硬件的信息?你可以使用如下命令将所有信息一次列出:

  1. inxi -F

示例输出:

  1. System: Host: sk Kernel: 3.13.0-45-generic x86_64 (64 bit) Desktop: LXDE (Openbox 3.5.2) Distro: Ubuntu 14.04 trusty
  2. Machine: System: Dell (portable) product: Inspiron N5050
  3. Mobo: Dell model: 01HXXJ version: A05 Bios: Dell version: A05 date: 08/03/2012
  4. 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)
  5. Clock Speeds: 1: 800.00 MHz 2: 1000.00 MHz 3: 800.00 MHz 4: 800.00 MHz
  6. Graphics: Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller
  7. X.Org: 1.15.1 drivers: intel (unloaded: fbdev,vesa) Resolution: 1366x768@60.0hz
  8. GLX Renderer: Mesa DRI Intel Sandybridge Mobile GLX Version: 3.0 Mesa 10.3.0
  9. Audio: Card: Intel 6 Series/C200 Series Family High Definition Audio Controller driver: snd_hda_intel
  10. Sound: Advanced Linux Sound Architecture ver: k3.13.0-45-generic
  11. Network: Card-1: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) driver: ath9k
  12. IF: wlan0 state: up mac:
  13. Card-2: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet controller driver: r8169
  14. IF: eth0 state: down mac:
  15. Drives: HDD Total Size: 500.1GB (52.5% used) 1: id: /dev/sda model: ST950032***S size: 500.1GB
  16. Partition: ID: / size: 455G used: 245G (57%) fs: ext4 ID: /boot size: 236M used: 159M (72%) fs: ext2
  17. ID: swap-1 size: 4.19GB used: 0.00GB (0%) fs: swap
  18. RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
  19. Sensors: System Temperatures: cpu: 64.5C mobo: N/A
  20. Fan Speeds (in rpm): cpu: N/A
  21. Info: Processes: 186 Uptime: 6:52 Memory: 1547.2/3861.3MB Client: Shell (bash) inxi: 1.9.17

就像上面你看到的那样,inxi显示出了完整的硬件详情信息。

更多的细节可以参考man手册。

  1. man inxi

结论

你在寻找一个可以显示完整的系统和硬件详情信息的简单工具吗?那么不用再找了,inxi会提供你所需要的。并且,它还是在你系统默认的软件仓库中的轻量级工具。你还想要更多东西吗?试一试它,你不会失望。

欢呼吧!


via: http://www.unixmen.com/inxi-find-system-hardware-information-linux/

作者:SK 译者:goreliu 校对:wxy

责任编辑:林师授 来源: Linux中国
相关推荐

2014-01-13 15:00:51

InxiLinux硬件

2021-12-17 14:49:44

Linuxinxi 命令系统信息

2017-04-20 18:00:59

Linux命令行工具系统信息

2018-01-08 15:50:21

Linux命令系统和硬件

2013-01-14 16:00:29

Linux系统

2015-09-23 09:22:01

系统硬件命令

2014-05-15 10:49:09

Linux 硬件信息Linux 命令

2009-12-11 15:47:54

Linux硬件信息

2009-09-25 10:48:07

Linux硬件信息操作系统

2014-05-04 10:34:32

Linux硬件信息Linux命令

2011-08-12 14:00:36

iPhone硬件版本系统信息

2011-07-28 14:00:45

Ubuntu

2019-05-24 14:15:30

Linux硬件信息命令

2022-10-08 09:17:15

Linuxinxi

2018-01-26 13:10:24

Linuxpython-hwin系统工具

2021-04-09 11:42:16

Linux 系统硬件操作系统

2011-07-19 09:25:52

2010-03-02 14:01:58

Linux硬件信息命令

2015-12-03 09:46:50

收集硬件Linux命令

2010-03-09 14:30:45

Linux全部硬件信息
点赞
收藏

51CTO技术栈公众号