Important Commands to view Hardware and System Info in Linux

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

This post is about, Important Commands to view Hardware and System Info in Linux

View Linux System Information

  • Use uname command to know the system name.
  • View all information by adding -a to uname command
  • Use -r added to uname to view the kernel release
  • View the network hostname by adding -n option to uname command
  • -v option for kernel-version
  • To show hardware name, use -m

The screenshot below shows an examples for all these options with uname command

View CPU Information

  • Use lscpu command to collect info about CPU as shown below.
lscpu

Show memory information

  • Use free command to collect and print information about memory, buffer, cache and swap.
free -m   #m option to view the memory size and its info in MB
free -g   #g option to view the memory size and its info in GB
free -mh  #mh option to simplify it to be read with human readable

View Block Device Information

  • Use lsblk to show storage devices such as hard disks, flash drives (to list blocks)
lsblk
  • Also to view all block devices use the -a option with lsblk.
lsblk -a

Show USB Information

  •  To collect information about USB , use lsusb command to list usb devices
lsusb

View SCSI Devices Information

  • List all SCSI devices using lsscsi command as shown below
lsscsi
  • Also use -s option with lsscsi command to view devices sizes

Show PCI Devices Information

  • Print and collect information about PCI devices.
lspci
  • To produce information about each connected device, use -v option as shown below
  • Use the -t option with lspci command to produce output in a tree format.

Show System Hardware Information

  • Also to collect information about your Linux system hardware, use lshw command as shown below.
lshw
Hardware and System Info
Hardware and System Info
  • Show a summary of your hardware information using the option -short with lshw command
lshw -short
  • Also you can an html file as an output for your collected info, you can do this with using the command below then accessing the file via a web browser.
sudo lshw -html > lshw.html

Show Linux File System Information

  • Show partition information by using fdisk command with option -l as shown below
sudo fdisk -l

View Info about Hardware Components

You can use dmidecode command to collect information about hardware components.

dmidecode is a free userspace command-line utility for Linux that can parse the SMBIOS data. The name dmidecode is derived from Desktop Management Interface, a related standard with which dmidecode originally interfaced. 

  • Print info about system hardware components as follows:
sudo dmidecode -t system
  • View info about CPU
sudo dmidecode -t processor
  • Show info about memory
sudo dmidecode -t memory
  • Show info about BIOS seetings and confs.
sudo dmidecode -t bios

-t refers to the type of the hardware component.

Conclusion

That’s it

In this article, we illustrated how to collect and view information about your system and its Hardware components.

I hope this guide was useful

thanks.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
MQ-Jr
MQ-Jr
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook