Check Hardware Information, Block Devices, and FileSystems On Linux

We can check and collect the hardware system information on Linux using the command line. Let’s see, how to collect system information and hardware on Linux.

Check Hardware Information, Block Devices, and FileSystems On Linux:

We have a command in Linux to find out the hardware information. we will show you how to check hardware information with Linux command. 

Check Out: How To Install Apache Cassandra 3.11 Database On CentOS 7/8

Check Hardware Information on Linux:

  1. lscpu command: This command will show you a number of the CPU attached to your machine and information about it.
[root@slave ~]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 142
Model name: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Stepping: 10
CPU MHz: 1992.000
BogoMIPS: 3984.00
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
NUMA node0 CPU(s): 0

2. lscpi command: This command shows you information about the PCI buses in the systems and devices attached to them.

[root@redis-slave ~]# lspci
-bash: lscpi: command not found

If you see lspci command not found, you need to install the package yum install pciutils -y

[root@slave ~]# lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware SVGA II Adapter
00:10.0 SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01

Check Out: How To Provide Private Subnets Servers To Internet Access

3. lsusb command: This command will show you the USB buses in the system and device attached to them.

[root@slave ~]# lsusb
-bash: lsusb: command not found

In a similar way, if you don’t find this command, run the below command to install it. 

yum install usbutils -y


Now check the USB buses using lsusb command.

[root@slave ~]# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 0e0f:0008 VMware, Inc. 
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Check Block Devices and FileSystems on Linux:

We will find some information about the Block devices and filesystems using the command line.

Check Out: How To Change Owner And Group of Directory In Linux

  1. df -h command: This command will show you the amount of space left or you have in your machine in more detail. 
[root@slave ~]# df -h
Filesystem        Size       Used     Avail     Use%    Mounted on
devtmpfs          383M        0       383M       0%      /dev
tmpfs             399M        0       399M       0%      /dev/shm
tmpfs             399M        5.7M    393M       2%      /run
tmpfs             399M        0       399M       0%      /sys/fs/cgroup
/dev/mapper/cl-root 8.0G      2.3G     5.8G       29%     /
/dev/sda1         976M        183M    727M       21%     /boot
tmpfs             80M         0       80M        0%      /run/user/0

you can also use the “df -Th” command to check the information along with the type of filesystem as shown below. 

[root@redis-slave ~]# df -Th
Filesystem    Type     Size     Used     Avail    Use%     Mounted on
devtmpfs      devtmpfs 383M      0       383M      0%        /dev

Use the “du -sh” to check the size of a file or directory on the Linux machine.

[root@redis-slave ~]# du -sh anaconda-ks.cfg 
4.0K anaconda-ks.cfg
[root@redis-slave ~]# du -sh data/
4.0k data/

Check Out: How To Check Linux Version Using Command Line

2. blkid command: This will show you the information about the UUID, volume labels, type, etc. 

[root@slave ~]# blkid
/dev/sda1: UUID="30310483-d39f-436b-8f22-f0638904b023" TYPE="ext4" PARTUUID="8aa12f60-01"
/dev/sda2: UUID="e6XGlT-Blmr-xVu9-cUvs-M6Tu-wvVA-85qwoG" TYPE="LVM2_member" PARTUUID="8aa12f60-02"
/dev/sr0: UUID="2019-08-15-21-52-52-00" LABEL="CentOS-8-BaseOS-x86_64" TYPE="iso9660" PTUUID="3e04f576" PTTYPE="dos"
/dev/mapper/cl-root: UUID="80db9c01-7db6-456e-9da1-e72320d6c8c3" TYPE="xfs"
/dev/mapper/cl-swap: UUID="550b5340-7381-41ca-afbe-a5ff79b3ebc7" TYPE="swap"

If you want to check for a particular device type, you can run the below command.

[root@redis-slave ~]# blkid /dev/sda1
/dev/sda1: UUID="30310483-d39f-436b-8f22-f0638904b023" TYPE="ext4" PARTUUID="8aa12f60-01"

3. lsblk command: This command will show you the information like name, major and minor number, Size,  if the device in Read-Only, Mountpoint, and type.

4. findmnt command: This command is used to find all the mount points or information about it such as filesystem type, options, source, etc.

collect system information linux

we can also check the other information using mount command. This will show you the information as shown below.

Check Out: How To Empty a Large File or Delete Them On Linux

tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=81616k,mode=700)

5. free -m command: This is used to check the free memory available on the machine.

[root@slave ~]# free -m
               total  used   free     shared    buff/cache   available
Mem:            797   670     53         0        73            13
Swap:           1023  140     883

That’s it. linux hardware info gui

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment