How to Install INXI on Ubuntu 18.04

Reading Time: 6 minutes

INXI is one of the best tools that offer a straightforward and comprehensive method for obtaining a wealth of information about a server with a single command.

There are a myriad of individual tools and commands that can be utilized to glean this information from a Linux system. Understanding the specific hardware that underlies a Linux server is an integral part of understanding that server’s capabilities. In this tutorial, we will cover the installation of INXI on an Ubuntu 18.04 server. It will also include some basic command-line usage of the INXI tool.

Pre-Flight Check:

Install INXI

Luckily, INXI has a package available in the base Ubuntu package repository. This means it can be installed using the apt command.

Before getting started, it’s always a good idea to update system packages by running:

root@ubuntu:~# apt update -y

Once the update is complete, install INXI by running the following command:

root@ubuntu:~# apt install inxi -y

That’s it! INXI is now installed. Next up, using INXI!

Using INXI

INXI has an abundantly diverse number of flags that can provide very specific information about the underlying system. To start, we will run INXI with no flags to get some basic information:

root@ubuntu:~# inxi
CPU~Single core Intel Core i5 750 (-UP-) speed~2666 MHz (max) Kernel~4.15.0-91-generic x86_64 Up~68 days Mem~354.8/1594.2MB HDD~244.8GB(1.9% used) Procs~89 Client~Shell inxi~2.3.56

The output provides information about the system CPU, the kernel, uptime, memory, hard drive usage and capacity, as well as the version of INXI.

Useful Flags:

CPU Information

The -C flag offers basic information about the servers CPU.

root@ubuntu:~# inxi -C
CPU: Single core Intel Core i5 750 (-UP-) cache: 8192 KB speed: 2666 MHz (max)

System Uptime/Current Processes

The -I flag provides information about the servers’ uptime, the current memory used as well as the shell type we are using.

root@ubuntu:~# inxi -I
Info:      Processes: 100 Uptime: 4d 2h 44m Memory: 1.81 GiB used: 355.4 MiB (19.2%) Init: systemd runlevel: 5
           Shell: bash inxi: 3.0.38

Disk Information

The -d flag shows us the information about the optical drive. It provides us with the same info as the -Dd flag. We can also use -x, which adds additional features line to the output. This will also show us if any floppy disks are present. Currently, there is no way to get any information about the floppy device that I am aware of, so it will simply show the
floppy id, without any extra data. -xx adds a few more features.

root@ubuntu:~# inxi -d
Drives:    Local Storage: total: 40.00 GiB used: 2.36 GiB (5.9%)
           ID-1: /dev/vda model: N/A size: 40.00 GiB
           Optical-1: /dev/sr0 vendor: QEMU model: QEMU DVD-ROM dev-links: cdrom,dvd
           Features: speed: 4 multisession: yes audio: yes dvd: yes rw: none

Network Information

The -n flag show us advanced network card information. The same information can be obtained using the -Nn flag. This shows us the interface, speed, mac address, id, state, etc.

root@ubuntu:~# inxi -n
Network:   Device-1: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: N/A
           Device-2: Red Hat Virtio network driver: virtio-pci
           IF: eth0 state: up speed: -1 duplex: unknown mac: 52:54:00:ab:0d:04
root@ubuntu:~# 

Aggregate Basic System Information

The -b flag shows us a basic short form output, (previously the -d flag was used for this). This is the same as running inxi -v 2

root@host:~# inxi -b
System:    Host: host.liquidweb.ninja Kernel: 5.4.0-14-generic x86_64 bits: 64 Console: tty 1
           
Distro: Ubuntu 20.04 LTS (Focal Fossa)

Machine:   Type: Kvm System: QEMU product: Standard PC (i440FX + PIIX, 1996) v: pc-i440fx-2.2 serial: N/A

Mobo: N/A model: N/A serial: N/A BIOS: SeaBIOS v: rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org date: 04/01/2014

CPU:       2x Single Core: Intel Xeon E5-1650 v4 type: SMP speed: 3600 MHz

Graphics:  Device-1: driver: N/A

Display: server: No display server data found. Headless machine? tty: 120x30

Message: Advanced graphics data unavailable in console for root.

Network:   Device-1: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: N/A

Device-2: Red Hat Virtio network driver: virtio-pci

Drives:    Local Storage: total: 40.00 GiB used: 2.36 GiB (5.9%)

Info:      Processes: 95 Uptime: 4d 3h 53m Memory: 1.81 GiB used: 356.7 MiB (19.2%) Init: systemd runlevel: 5

Shell: bash inxi: 3.0.38

Possibly the most useful flag available is the -h flag because it enumerates all the different flags that the INXI options provide, along with the type of information that flag supplies.

root@ubuntu:~# inxi -h

Our last flag, “––recommends” checks for application dependencies, and various directories, and display what package(s) we need to install to add support for a given feature.

root@host:~# inxi --recommends
inxi will now begin checking for the programs it needs to operate.

Check inxi --help or the man page (man inxi) to see what options are available.
----------------------------------------------------------------------------

Test: core tools:

Perl version:  5.030000
Current shell: bash 5.0.16
Default shell: bash
sh links to: /usr/bin/dash
Package manager: apt
----------------------------------------------------------------------------

Test: required system directories:

/proc: ..............................................................Present
/sys: ...............................................................Present

All required system directories are present
----------------------------------------------------------------------------

Test: recommended system programs:

Note: IPMI sensors are generally only found on servers. To access that data, you only need one of the ipmi items.

blockdev: --admin -p/-P (filesystem blocksize) .....................................................................Present
dig: -i wlan IP .....................................................................Present
dmidecode: -M if no sys machine data; -m .....................................................................Present
fdisk: -D partition scheme (fallback) .....................................................................Present
file: -o unmounted file system (if no lsblk) .....................................................................Present
hddtemp: -Dx show hdd temp .....................................................................Present
ifconfig: -i ip LAN (deprecated) .....................................................................Present
ip: -i ip LAN .....................................................................Present
ipmitool: -s IPMI sensors (servers) .....................................................................Missing
ipmi-sensors: -s IPMI sensors (servers) .....................................................................Missing
lsblk: -o unmounted file system (best option) .....................................................................Present
lsusb: -A usb audio; -N usb networking; --usb (optional) .....................................................................Present
modinfo: Ax; -Nx module version .....................................................................Present
runlevel: -I fallback to Perl .....................................................................Present
sensors: -s sensors output .....................................................................Present
smartctl: -Da advanced data .....................................................................Missing
strings: -I sysvinit version .....................................................................Missing
sudo: -Dx hddtemp-user; -o file-user .....................................................................Present
tree: --debugger 20,21 /sys tree .....................................................................Present
upower: -sx attached device battery info .....................................................................Missing
uptime: -I uptime .....................................................................Present

The following recommended system programs are missing:
Program: ipmitool ~ Install package: ipmitool
Program: ipmi-sensors ~ Install package: freeipmi-tools
Program: smartctl ~ Install package: smartmontools
Program: strings ~ Install package: binutils
Program: upower ~ Install package: upower
----------------------------------------------------------------------------

Test: recommended display information programs:

glxinfo: -G glx info .....................................................................Present
wmctrl: -S active window manager (fallback) .....................................................................Missing
xdpyinfo: -G multi screen resolution .....................................................................Present
xprop: -S desktop data .....................................................................Present
xrandr: -G single screen resolution .....................................................................Present

The following recommended display information programs are missing:
Program: wmctrl ~ Install package: wmctrl
----------------------------------------------------------------------------

Test: recommended downloader programs (You only need one of these):

Perl HTTP::Tiny is the default downloader tool if IO::Socket::SSL is present. See --help --alt 40-44 options for how to override default downloader(s) in case of issues.

If dig is installed, it is the default for WAN IP data. Strongly recommended. Dig is fast and accurate.

curl: -i (if no dig); -w,-W; -U .....................................................................Present
dig: -i wlan IP .....................................................................Present
wget: -i (if no dig); -w,-W; -U .....................................................................Present

All recommended downloader programs are present
----------------------------------------------------------------------------

Test: recommended Perl modules (Optional):

None of these are strictly required, but if you have them all, you can eliminate some recommended non Perl programs from the install.

HTTP::Tiny and IO::Socket::SSL must both be present to use as a downloader option. For json export Cpanel::JSON::XS is preferred over JSON::XS.

HTTP::Tiny: -U; -w,-W; -i (if dig not installed) .....................................................................Present
IO::Socket::SSL: -U; -w,-W; -i (if dig not installed) .....................................................................Missing
Time::HiRes: -C cpu sleep (not required); --debug timers .....................................................................Present
Cpanel::JSON::XS: --output json - required for export .....................................................................Missing
JSON::XS: --output json - required for export (legacy) .....................................................................Missing
XML::Dumper: --output xml - Crude and raw .....................................................................Missing
Net::FTP: --debug 21,22 .....................................................................Present

The following recommended Perl modules are missing:
Perl Module: IO::Socket::SSL ~ Install package: libio-socket-ssl-perl
Perl Module: Cpanel::JSON::XS ~ Install package: libcpanel-json-xs-perl
Perl Module: JSON::XS ~ Install package: libjson-xs-perl
Perl Module: XML::Dumper ~ Install package: libxml-dumper-perl
----------------------------------------------------------------------------

Test: recommended directories:

/dev: -l,-u,-o,-p,-P,-D disk partition data .....................................................................Present
/dev/disk/by-id: -D serial numbers .....................................................................Present
/dev/disk/by-label: -l,-o,-p,-P partition labels .....................................................................Present
/dev/disk/by-path: -D extra data .....................................................................Present
/dev/disk/by-uuid: -u,-o,-p,-P partition uuid .....................................................................Present
/sys/class/dmi/id: -M system, motherboard, bios .....................................................................Present

All recommended directories are present
----------------------------------------------------------------------------

Test: recommended files:

Note that not all of these are used by every system, so if one is missing it's usually not a big deal.

/etc/lsb-release: -S distro version data (older version) .....................................................................Present
/etc/os-release: -S distro version data (newer version) .....................................................................Present
/proc/asound/cards: -A sound card data .....................................................................Missing
/proc/asound/version: -A ALSA data .....................................................................Missing
/proc/cpuinfo: -C cpu data .....................................................................Present
/proc/mdstat: -R mdraid data (if you use dm-raid) .....................................................................Present
/proc/meminfo: -I,-tm, -m memory data .....................................................................Present
/proc/modules: -G module data (sometimes) .....................................................................Present
/proc/mounts: -P,-p partition advanced data .....................................................................Present
/proc/scsi/scsi: -D Advanced hard disk data (used rarely) .....................................................................Present
/var/log/Xorg.0.log: -G graphics driver load status .....................................................................Missing

The following recommended files are missing:
File: /proc/asound/cards
File: /proc/asound/version
File: /var/log/Xorg.0.log
----------------------------------------------------------------------------
Ok, all done with the checks. Have a nice day.

root@host:~#

Conclusion

INXI is a quick way to find out a vast amount of information about a Linux system. It is easy to install and use, and is a viable tool for any system administrator’s arsenal.

Give us a call at 800.580.4985, or open a chat or ticket with us to speak with one of our knowledgeable Solutions or Experienced Hosting advisors to learn how you can take advantage of this software today!

Refer a friend and get hosting credit!