Cyberithub

How to Install lspci, lsscsi, lsusb, and lsblk in RedHat/CentOS 7 with Easy Steps

Advertisements

In this tutorial, I will take you through the steps to install lspci, lsscsi, lsusb, and lsblk tools in RedHat/CentOS 7. In few of the instances we wanted to know the hardware configuration of our Servers. We have some open source tool available which can be used to check those configurations. For e.g: to check pci devices lspci tool can be used, for scsi devices lsscsi can be used, for usb devices lsusb can be used and for block devices lsblk can be used. We need to go ahead and download those packages using yum tool.

lspci - To List all PCI devices in the System

lsscsi -  To List all SCSI Devices in the System

lsusb - To List all USB Devices in the System

lsblk - To List all Block devices in the System

Install lspci,lsscsi,lsusb and lsblk tools

 

How to Install lspci, lsscsi, lsusb, and lsblk in RedHat/CentOS 7 with Easy Steps 1

To install lsusb tool in linux

You need to use yum install usbutils command to install lsusb tool.

[root@localhost ~]# yum install usbutils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.myfahim.com
* updates: centos.myfahim.com
Resolving Dependencies
--> Running transaction check
---> Package usbutils.x86_64 0:007-5.el7 will be installed
--> Processing Dependency: libusb-1.0.so.0()(64bit) for package: usbutils-007-5.el7.x86_64
--> Running transaction check
---> Package libusbx.x86_64 0:1.0.21-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
usbutils x86_64 007-5.el7 base 79 k
Installing for dependencies:
libusbx x86_64 1.0.21-1.el7 base 61 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 141 k
Installed size: 323 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): libusbx-1.0.21-1.el7.x86_64.rpm | 61 kB 00:00:02
(2/2): usbutils-007-5.el7.x86_64.rpm | 79 kB 00:00:02
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 50 kB/s | 141 kB 00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libusbx-1.0.21-1.el7.x86_64 1/2
Installing : usbutils-007-5.el7.x86_64 2/2
Verifying : usbutils-007-5.el7.x86_64 1/2
Verifying : libusbx-1.0.21-1.el7.x86_64 2/2

Installed:
usbutils.x86_64 0:007-5.el7

Dependency Installed:
libusbx.x86_64 0:1.0.21-1.el7

Complete!

To install lspci tool in linux

Here, you need to use yum install pciutils command to install lspci tool.

[root@localhost ~]# yum install pciutils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.myfahim.com
* updates: centos.myfahim.com
Resolving Dependencies
--> Running transaction check
---> Package pciutils.x86_64 0:3.5.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
pciutils x86_64 3.5.1-3.el7 base 93 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 93 k
Installed size: 196 k
Is this ok [y/d/N]: y
Downloading packages:
pciutils-3.5.1-3.el7.x86_64.rpm | 93 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : pciutils-3.5.1-3.el7.x86_64 1/1
Verifying : pciutils-3.5.1-3.el7.x86_64 1/1

Installed:
pciutils.x86_64 0:3.5.1-3.el7

Complete!

To install lsscsi tool in linux

You can do yum install lsscsi command to install lsscsi tool.

[root@localhost ~]# yum install lsscsi
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.myfahim.com
* updates: centos.myfahim.com
Resolving Dependencies
--> Running transaction check
---> Package lsscsi.x86_64 0:0.27-6.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
lsscsi x86_64 0.27-6.el7 base 47 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 47 k
Installed size: 88 k
Is this ok [y/d/N]: y
Downloading packages:
lsscsi-0.27-6.el7.x86_64.rpm | 47 kB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : lsscsi-0.27-6.el7.x86_64 1/1
Verifying : lsscsi-0.27-6.el7.x86_64 1/1

Installed:
lsscsi.x86_64 0:0.27-6.el7

Complete!

To install lsblk tool in linux

Here, you need to use yum install util-linux-ng command to install lsblk tool. In most of the cases lsblk tool will be shipped with the CentOS Pacakges but in case not available, you can use below command.

[root@localhost ~]# yum install util-linux-ng
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* extras: centos.myfahim.com
* updates: centos.myfahim.com
Package util-linux-2.23.2-61.el7.x86_64 already installed and latest version
Nothing to do

Also Read: Enable SSH On Ubuntu

Reference: Hardware Commands in Linux

1 thought on “How to Install lspci, lsscsi, lsusb, and lsblk in RedHat/CentOS 7 with Easy Steps”

Leave a Comment