3 options for getting system info from the Linux terminal. The info they provide is often sourced from your `/proc` directory.
Inxi is a Linux command line tool designed for use during chat sessions which shows info about your system’s hardware, CPU, drivers, Kernel, processes, memory usage, plus a load more. It has privacy built in so can filter out your personal info such as IP and MAC address. This makes it a good option if you intend to post your system details on the web or share them with others.
To find the type of CPU, amount of RAM, Disk Size, uptime, and what Kernel
you’re running all you need to run is
inxi. Note that unlike the below
example, your output will be colored so it’s easy to read.
roast@mint:~# inxi CPU: Quad Core Intel Core i7-4710MQ (-MT MCP-) speed/min/max: 898/800/3500 MHz Kernel: 5.3.0-46-generic x86_64 Up: 2d 12h 22m Mem: 2977.4/7651.8 MiB (38.9%) Storage: 894.25 GiB (44.1% used) Procs: 275 Shell: bash 4.4.20
Find the model number of your laptop, serial number, motherboard type, and date
your machine was made with the
-M option (short for ‘Machine’). Note how the
serial number has been hidden due to inxi’s built in privacy feature, if you’re
not posting the info anywhere public just use
sudo inxi -M to reveal the
# Run this as root to reveal your private serial numbers roast@mint:~# inxi -M Machine: Type: Laptop System: LENOVO product: 20FAS04S0D v: ThinkPad T460s serial: <superuser/root required> Mobo: LENOVO model: 20FAS04S0D v: SDK0J40697 WIN serial: <superuser/root required> UEFI [Legacy]: LENOVO v: N1CET47W (1.15 ) date: 08/08/2016
-d option to get info about your SSD, hard disks, and any storage
drives attached to your machine. It’s a quick way to see the make of the disk,
the size, and the amount of space remaining.
roast@mint:~# inxi -d Drives: Local Storage: total: 238.47 GiB used: 168.26 GiB (70.6%) ID-1: /dev/sda vendor: Samsung model: MZNTY256HDHP-000L7 size: 238.47 GiB Message: No Optical or Floppy data was found.
Note that not all of these commands have privacy enabled by default so double
check before posting it on a public forum. For example: running
inxi -i will
display both your local IP and WAN IP numbers by default so if you want to keep
these private add use
inxi -izto enable privacy filtering.
inxi -B # Battery (charge and condition) inxi -C # CPU (more details about the cpu) inxi -D # Disk (size and usage of local disks) inxi -G # Graphics (Card, driver, resolution) inxi -i # IP address (includes local and wide) inxi -M # Machine (model number, date) inxi -s # Sensors (temps, fan speeds) inxi -S # System (distro, kernel) inxi -t # Processes (top 5 for CPU and memory)
This one is not as pretty as inxi but it is faster and smaller. It gets info by
/proc files and needs to be run as a superuser (even though it
works as a regular user but warns you about some output being incomplete).
By default it’ll give you a huge list of everything but you can narrow it down
by using the
-class option to only show the given class of hardware. It also
-short option which return fewer details, and a sanitise option
-sanitize to remove sensitive info like serial numbers etc.
-classto narrow down the results
Find info about your CPU by passing in the
-class cpu command into
Leave out the
-short option if you want more info.
# Using the -short option here because most of the details are useless to me. roast@mint:~# lshw -class cpu -short WARNING: you should run this program as super-user. H/W path Device Class Description ==================================================== /0/1 processor Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
roast@mint:~# sudo lshw -class memory -short H/W path Device Class Description ==================================================== /0/3 memory 64KiB L1 cache /0/4 memory 64KiB L1 cache /0/5 memory 512KiB L2 cache /0/6 memory 3MiB L3 cache /0/8 memory 8GiB System Memory /0/8/0 memory 4GiB Chip DDR4 Synchronous 2133 MHz (0.5 ns) /0/8/1 memory 4GiB SODIMM DDR4 Synchronous 2133 MHz (0.5 ns) /0/c memory 128KiB BIOS /0/100/1f.2 memory Memory controller
There are way more of these available, find a list of all the classes by running
lshw -short # list available classes lshw -class network # network hardware info (doesn't include IP address) lshw -class storage # Hard disk info lshw -class usb # USB hardware info
If lshw is too much for you then there are a bunch of similar commands each of which show details about specific parts of the system. Here are a couple as examples but I’m sure there are loads more.
lscpu # CPU info lsblk # Hard disks, flash drives ect (aka block devices) lsusb # USB buses lspci # PCI bus info lssci # SCSI info