How to check your computer specifications on Linux

If you would like to check your computer specs via a command window (terminal), there are several commands and options available for you.

sudo lshw

The previous command stands for ‘list hardware’ and it does exactly what it stands for. It lists all your hardware including the memory, CPU, mother board and the rest. Since this command gives so much information you will have to scroll up to find the bits of info you care about. You could always use the less command to scroll through the info:

sudo lshw | less

This way you can use the up/down arrow, pg-up/pg-down keys, or the middle mouse button to scroll through the specs.

Another option is to use the html flag (-html) in conjunction with output redirection to store the specs into a file. That way the specs are saved in a file you can access easily anytime.

sudo lshw -html > mySpecs.html

If you just want to look at the available memory, you can use the free command with the -h (human flag) to make the output easier for humans to understand:

free -h

Alternatively, there are files inside the /proc/ directory that contain hardware specs for your machine. Of particular interest are the /proc/meminfo file and the /proc/cpuinfo file. You can look at their contents the using the cat command. (cat displays the contents of a file onto the terminal).

cat /proc/meminfo

cat /proc/cpuinfo

meminfo contains detailed information about the memory. The top three lines of the output are the most important ones. They show MemTotal, MemFree, MemAvailable. Keep in mind these are shown in KB so you would have to divide by 1,000,000 to convert to GB.

cpuinfo contains a list of each CPU core available to your computer and information for each one.

Other alternatives of getting memory information include the commands


Checking video graphics card specs

sudo lshw -c video

This will display an output like the following

       description: VGA compatible controller
       product: GT215GLM [Quadro FX 1800M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:33 memory:e2000000-e2ffffff memory:d0000000-dfffffff memory:e0000000-e1ffffff ioport:7000(size=128) memory:c0000-dffff


Another Way



lscpci | grep VGA

Checking USB devices




Hopefully these commands will suffice your needs for the information you need to get about your system. Leave comments if you feel I left something important out, if I should make changes, or if there are any errors. You can also comment for any other reason 🙂