There are a multitude of ways of listing numerous things within our Linux system. USB devices, PCI/PCI express cards, network details. and hard drives. We are now going to go through each one of those utilities.
Utilities available to use
The following system utilities will help get you started with searching for devices:
lspci lets you see connected PCI/PCI express devices. Such examples would involve network cards and graphics cards. In order to install it, run this command:
sudo apt-get install pciutils
sudo yum -y install pciutils
When finished, just simply run lspci to get a list of PCI devices currently connected to your machine.
lsscsi will display information pertaining to disk drives attached to your system. Some examples would be SSDs, hard drives, CD-ROM, etc. In order to install:
sudo apt-get install lsscsi
sudo yum -y install lsscsi
When done, just simply run the command lsscsi in shell to display currently connected drives,
lsusb will display your connected usb devices. This can widely range from usb drives to network adapters. Run this command to install it:
sudo apt-get install usbutils
sudo yum -y install usbutils
Once you’ve finished installing usbutils. It is as simple as running the lsusb command to display your connected devices.
lsblk will display information related to block devices. These sort of devices displayed are mostly storage such as hard drives, CD/DVD, USB drives, etc. In order to install this program, run this:
sudo apt-get install util-linux
sudo yum -y install util-linux-ng
Run lsblk to display a list of block devices.
Usually these programs have been already installed in your Linux distribution. When doing a minimal installation involving only the bare system, these should definitely come in handy.