12 Commands to Check Linux System and Hardware Information

In this guide, you will learn to use 12 Commands to Check Linux System and Hardware Information. As a Linux user, you must know about your Linux system information and Hardware. Here are Linux Commands comes in that can be used to give you detailed information about your Linux system and hardware.

Follow the rest of the article to get familiar with these most useful Linux commands.

12 Commands to Check Linux System and Hardware Information

You can easily use Linux commands to check the system information, CPU, Memory, Hardware, etc. Now follow the steps below to see what are these amazing commands and the usage of them.

Step 1 – Check Linux System Information

At this point, you can easily find your system information such as system name, and kernel version by using the following command:

Command Number 1: The uname command

uname -a

The -a option will show you all the system information.

Example Output
Linux ubuntu.jammy 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

From the output, you will see your Linux system name, Network hostname, Kernel release, Kernel version, and hardware name.

Also, you can use other options in the uname command to check your desired information:

  • uname: system name.
  • uname -s: system kernel name.
  • uname -r: kernel release.
  • uname -v: kernel version.
  • uname -n: network hostname.
  • uname -m: hardware name.

Step 2 – Check Linux File System Partitions

If you want to check your file system partitions, you can easily use the following command:

Command Number 2: The fdisk Command

You can use the -l option in the fdisk command to list your file system partitions:

fdisk -l
Example Output
Disk /dev/loop0: 61.96 MiB, 64970752 bytes, 126896 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 61.89 MiB, 64901120 bytes, 126760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
...

Step 3- Check Linux Hardware Information

At this point, you can easily display your Hardware information in detail such as motherboard, RAM, or cache configurations, firmware version, bus speed, CPU, and speed by using the command below:

Command Number 3: The lshw command

lshw

This will give a long information about every detailed hardware information. If you want to get a shortlist and take a brief look at your Hardware information, you can use the -short option in the lshw command:

lshw -short

Step 4 – Check Linux Memory, BIOS, and Processor Information

At this point, you can find out your Linux system, memory, BIOS, and processor information by using the command below:

Command number 4: The dmidecode command

dmidecode -t target-info

The -t option is used for the target entry you want to get the information about it.

  • dmidecode -t system: System information.
  • dmidecode -t processor: CPU information.
  • dmidecode -t memory: Memory information.
  • dmidecode -t bios: BIOS information.

Also, there are many more commands that you can check your free space and used memory or file system partitions.

Command Number 5: The free Command

This free command with the -m option, will display you the total memory, used memory, and free memory on your Linux system.

free -m

Command Number 6: The df command

To check the file system’s partitions, mount points, and disk spaces, you can easily use the df command with the -H option.

df -H

Step 5 – Check Linux CPU Information

There is a command that you can use to display your CPU information in detail on your Linux system:

Command Number 7: The lscpu command

lscpu
Example Output
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  2
  On-line CPU(s) list:   0,1
Vendor ID:               GenuineIntel
...

Step 6 – Check Linux USB Controllers

At this point, you can check your USB devices that are communicating with your computer by using the following command:

Command Number 8: The lsusb command

lsusb

Also, you can use the -v option to get the information in detail:

lsusb -v 

Step 7 – Display SATA (Serial Advanced Technology Attached) Disk Information

SATA is an interface that is used to transfer data between storage devices and motherboards. To check the Linux SATA disk information such as serial number and model, you can use the command below:

Command Number 9: The hdparm command

You must specify the device path to the command to check your SATA disk information:

hdparm <device name>

For example:

hdparm /dev/sda

Step 8 – Display Linux SCSI Devices

SCSI which stands for Small Computer System Interface, is a high-level driver that handles a variety of storage hardware. To check your Linux SCSI device information, you can use the following command:

Command Number 10: The lsscsi command

lsscsi

Also, you can use the -s option to show the device sizes.

Note: To use the lsscsi command on your Linux distro, you must install it. It is not installed by default on the server.

To install it on Debian-based distros, you can use:

apt install lsscsi

To install it on Centos and RHEL-based distros, you can use:

yum install lsscsi #centos7,rhel7
dnf install lsscsi #centos8,rhel8,rhel9

Step 9 – List Linux Block Devices

Block Devices can physically attach to the computer and you can access them remotely such as CD-ROM, flash, or hard drives. To list the Linux block devices, you can use the following command:

Command Number 11: The lsblk command

lsblk
Example Output
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0    62M  1 loop /snap/core20/1587
loop1    7:1    0  61.9M  1 loop /snap/core20/1405
loop2    7:2    0  79.9M  1 loop /snap/lxd/22923
loop3    7:3    0  44.7M  1 loop /snap/snapd/15534
loop4    7:4    0    47M  1 loop /snap/snapd/16292
...

Step 10 – List Linux PCI devices

PCI which stands for Peripheral Component Interconnect is used to connect different peripherals of the Linux Platform. You can list the PCI devices in Linux by using the command below:

Command Number 12: The lspci command

lspci

Also, you can use the -v option to get the detailed information:

lspci -v

Conclusion

At this point, you have become familiar with the most useful 12 Commands to Check Linux System and Hardware Information. These are the most useable Linux Commands that every Linux user must know that easily check the system information and hardware.

Do you know other Linux commands that are useful for system checks and hardware info? Please comment for us and share your ideas.

Hope you enjoy it. You may be interested in these articles on the Orcacore website:

Best Sites to Run Linux in Browser

4 Ways To Install OpenCV on Debian 12 Bookworm

Clean Up Unnecessary and Junk Files on Ubuntu

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!