Mastering the Command 'inxi' (with examples)
- Linux
- December 17, 2024
‘inxi’ is a powerful command-line tool that displays detailed system information. It is especially useful for users and system administrators who need to quickly gather insight into various hardware and software configurations without navigating through multiple software tools or interfaces. This tool can provide comprehensive information about the CPU, memory, disk, network, and much more, making it particularly helpful for debugging purposes or for gaining a better understanding of a system’s health and configuration.
Use case 1: Print a summary of CPU, memory, hard drive, and kernel information
Code:
inxi
Motivation:
Sometimes, a succinct overview of your system’s hardware and software configuration is all that you need. This information can be extremely helpful for initial diagnostics, when reporting issues, or simply for keeping a personal log of your system’s specifications. The inxi
command without additional options provides a quick summary, benefiting those who wish to collect basic information without delving into extended details.
Explanation:
The inxi
command on its own is a quick invocation without any additional arguments. It defaults to providing a brief overview of the key components of your system, such as the CPU, memory, hard drive, and the kernel version. This is akin to a snapshot of the most vital statistics of your machine, allowing users to report or note down key system details without excess information or detail.
Example output:
CPU: Dual core Intel Core i5-7200U (-MT MCP-) speed/min/max: 800/400/3500 MHz
Kernel: Linux 5.4.0-42-generic x86_64
Memory: 8.00 GiB
Hard Drive: SSD 256GB
Use case 2: Print a full description of CPU, memory, disk, network, and process information
Code:
inxi -Fz
Motivation:
For instances where you need an in-depth understanding of system hardware and its current operation, the -Fz
option of the inxi
command is fitting. This is especially crucial for troubleshooting or when you need to provide comprehensive details to a support team. Whether you are dealing with performance bottlenecks or unexplained behavior on your system, having full information on both hardware and currently-running processes is invaluable.
Explanation:
-F
: This option stands for “full,” promptinginxi
to output a more detailed report. It provides extensive details beyond the basic summary, including information about the CPU, memory modules, disk partitions, network interfaces, and running processes.-z
: This option is used to hide sensitive information like personal hardware addresses (MAC addresses) or serial numbers, which is important for maintaining privacy when sharing output with external parties.
Example output:
System: Kernel: 5.4.0-42-generic x86_64
CPU: Quad core Intel Core i7-8750H
Memory: 16.00 GiB
Graphics: Intel UHD 630
Disk: /dev/sda: 512GB
Network: Ethernet Interface: eth0
Processes: 249
Use case 3: Print information about the distribution’s repository
Code:
inxi -r
Motivation:
Understanding which repositories your system is using can be crucial for maintaining software packages, upgrading, or troubleshooting issues related to software installations or updates. This command is also beneficial when verifying repository settings during scripting or managing multiple servers, where one might need to ensure consistency across various systems.
Explanation:
-r
: This flag instructsinxi
to display information related to the software repositories configured on the system. This might include URLs of repositories, their priorities, or any special configuration applied to them. Such information is crucial when resolving package conflicts or ensuring that software is sourced from secure and intended repositories.
Example output:
Repos:
Active apt repos - main: http://archive.ubuntu.com/ubuntu bionic
Active apt repos - universe: http://archive.ubuntu.com/ubuntu bionic-updates
Active apt repos - multiverse: http://archive.ubuntu.com/ubuntu bionic-security
Conclusion
The inxi
command is an essential tool for anyone keen on effective system management or troubleshooting. By offering tailored outputs through various options, inxi
meets differing informational needs—from a simple summary to detailed descriptions—making system diagnostics simpler and more efficient.