Inxi - Finding out hardware configuration on Linux

📄 BetterWays.dev wiki page | 🕑 Last updated: Sep 8, 2022

Inxi is a great tool you can use to find out the system and hardware information on a Linux system.

If you're using Debian/Ubuntu-based distribution, you can install it with:

apt install inxi

On rpm-based distros, you can use:

dnf install inxi

On Arch Linux, you can install inxi package from AUR.

You can use inxi --recommends to check if you need to install additional dependencies.

Basic use

If you run just the inxi command, you'll get a quick summary like this:

CPU: Single Core Intel Xeon (Skylake IBRS) (-MCP-) speed: 2100 MHz 
Kernel: 4.19.0-12-amd64 x86_64 Up: 649d 1h 15m Mem: 350.9/1947.2 MiB (18.0%) 
Storage: 19.07 GiB (11.9% used) Procs: 87 Shell: bash 5.0.3 inxi: 3.0.32

To get a full summary, you can use -F or --full flag, i.e. inxi -F:

System:    Host: s Kernel: 4.19.0-12-amd64 x86_64 bits: 64 Console: tty 0 Distro: Debian GNU/Linux 10 (buster) 
Machine:   Type: Kvm System: BetterWays product: vServer v: 20171111 serial: 8711068 
           Mobo: N/A model: N/A serial: N/A BIOS: BetterWays v: 20171111 date: 11/11/2017 
CPU:       Topology: Single Core model: Intel Xeon (Skylake IBRS) bits: 64 type: MCP L2 cache: 16.0 MiB 
           Speed: 2100 MHz min/max: N/A Core speed (MHz): 1: 2100 
Graphics:  Device-1: driver: bochs-drm v: N/A 
           Display: server: No display server data found. Headless machine? tty: 237x63 
           Message: Unable to show advanced data. Required tool glxinfo missing. 
Audio:     Message: No Device data found. 
Network:   Device-1: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: piix4_smbus 
           Device-2: Red Hat Virtio network driver: virtio-pci 
           IF: eth0 state: up speed: -1 duplex: unknown mac: 96:00:00:80:bb:5e 
Drives:    Local Storage: total: 19.07 GiB used: 2.27 GiB (11.9%) 
           ID-1: /dev/sda vendor: QEMU model: HARDDISK size: 19.07 GiB 
Partition: ID-1: / size: 18.60 GiB used: 2.27 GiB (12.2%) fs: ext4 dev: /dev/sda1 
Sensors:   Missing: Required tool sensors not installed. Check --recommends 
Info:      Processes: 88 Uptime: 649d 1h 19m Memory: 1.90 GiB used: 351.8 MiB (18.1%) Init: systemd runlevel: 5 Shell: bash 
           inxi: 3.0.32

If for some reason you get weird output, you can turn off colors with -c 0.

Output

The default behavior is to just output the information to the screen (--output screen is implied).

But we also can output the information to json/xml files, which can be very useful for scripting/programming purposes.

You can use inxi -F --output json --output-file /tmp/inxi.json to get a json file:

{
  "001#Partition": [
    {
      "001#ID": "/",
      "007#uuid": "4236cc65-d07b-4264-8ae6-ff71b870d7cc",
      "006#label": "N/A",
      "003#used": "2.27 GiB (12.2%)",
      "005#dev": "/dev/sda1",
      "002#size": "18.60 GiB",
      "004#fs": "ext4"
    }
  ],
  "000#CPU": [
    {
      "000#Topology": "Single Core",
      "002#bits": 64,
      "001#model": "Intel Xeon (Skylake IBRS)",
      "004#L2 cache": "16.0 MiB",
      "003#type": "MCP"
    },
    {
      "008#1": "2100",
      "005#Speed": "2100 MHz",
      "006#min/max": "N/A",
      "007#Core speed (MHz)": ""
    },
    {
      "009#Flags": "3dnowprefetch abm adx aes apic arat avx avx2 avx512bw avx512cd avx512dq avx512f avx512vl bmi1 bmi2 clflush clwb cmov constant_tsc cpuid cpuid_fault cx16 cx8 de erms f16c fma fpu fsgsbase fxsr hle hypervisor ibpb ibrs invpcid invpcid_single lahf_lm lm mca mce md_clear mmx movbe msr mtrr nopl nx ospke pae pat pcid pclmulqdq pdpe1gb pge pku pni popcnt pse pse36 pti rdrand rdseed rdtscp rep_good rtm sep smap smep ssbd sse sse2 sse4_1 sse4_2 ssse3 syscall tsc tsc_deadline_timer tsc_known_freq vme x2apic xgetbv1 xsave xsavec xsaveopt xtopology"
    }
  ]
}

If you get an error message like Error 80: The required json Perl module is not installed: Cpanel::JSON::XS OR JSON::XS, you need to install libjson-xs-perl package.

xml:

inxi -F --output xml --output-file /tmp/inxi.xml

In case you see something like Error 80: The required xml Perl module is not installed: XML::Dumper, you need to install libxml-dumper-perl package.

If you need to just export textual info, you use normal output redirection (you can disable colors with -c 0, but inxi will usually do that automatically if the connected output is not interactive terminal):

inxi -c 0 -F > /tmp/inxi.txt

Specific categories

If you're interested only in specific categories, you can limit the output with the following flags (the same works for json/xml output):

Audio info - inxi -A:

Audio:     Message: No Device data found.

CPU info - inxi -C:

CPU:       Topology: Single Core model: Intel Xeon (Skylake IBRS) bits: 64 type: MCP L2 cache: 16.0 MiB 
           Speed: 2100 MHz min/max: N/A Core speed (MHz): 1: 2100 

Drives info - inxi -D:

Drives:    Local Storage: total: 19.07 GiB used: 2.27 GiB (11.9%) 
           ID-1: /dev/sda vendor: QEMU model: HARDDISK size: 19.07 GiB 

Graphics info - inxi -G:

Graphics:  Device-1: driver: bochs-drm v: N/A 
           Display: server: No display server data found. Headless machine? tty: 237x63 
           Message: Unable to show advanced data. Required tool glxinfo missing.

Machine info - inxi -M:

Machine:   Type: Kvm System: BetterWays product: vServer v: 20171111 serial: 8711068 
           Mobo: N/A model: N/A serial: N/A BIOS: BetterWays v: 20171111 date: 11/11/2017 

Network info - inxi -N:

Network:   Device-1: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: piix4_smbus 
           Device-2: Red Hat Virtio network driver: virtio-pci 

And, of course, you can combine multiple categories - inxi -C -D:

CPU:       Topology: Single Core model: Intel Xeon (Skylake IBRS) bits: 64 type: MCP L2 cache: 16.0 MiB 
           Speed: 2100 MHz min/max: N/A Core speed (MHz): 1: 2100 
Drives:    Local Storage: total: 19.07 GiB used: 2.27 GiB (11.9%) 
           ID-1: /dev/sda vendor: QEMU model: HARDDISK size: 19.07 GiB 

Weather

If that's not enough, inxi can also show you the weather info with inxi -w:

Weather:
  Report: temperature: 29.4 C (85 F) conditions: Scattered clouds 
  Locale: current time: Sun 04 Sep 2022 02:40:34 PM CEST (Europe/Berlin) 
  Source: WeatherBit.io 

(you can specify the location with -W switch)

Alternatives

A lot of this information can be found in /proc, which doesn't require any additional tool.

Another popular script you may want to check is called neofetch.


Comments and suggestions

You can use this form to submit a suggestion or a comment.

If you find this site useful, please consider supporting it. Supporters also get access to some extras.