Learn GNU/Linux Commands (17): View Hardware - lscpu, lspci, lsusb, lsblk

Many modern GNU/Linux distributions such as Debian/Ubuntu and Fedora/CentOS/RHEL have out-of-the-box programs for viewing hardware infestations.

Display CPU Specifications

lscpu

Display information about the CPU architecture, including model name, number of cores, frequency, cache size, etc. If this command is not available, try installing a package named "util-linux".

Part of such information can also be found in "/proc/cpuinfo".

For example:

[texpion@com ~]$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 142
Model name:            Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Stepping:              9
CPU MHz:               2904.000
CPU max MHz:           2904.0000
BogoMIPS:              5808.00
Virtualization:        VT-x
Hypervisor vendor:     vertical
Virtualization type:   full
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand


Display PCI Devices

lspci

Display information about PCI buses in the system and devices connected to them. The GPU (VGA compatible controller), Audio device and Ethernet controller are often included. This program can be used for checking whether drivers are correctly installed.

Options:

  • -v: Be verbose (-vv for very verbose).

For example:

[texpion@com ~]$ lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
00:05.0 Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio Controller (rev 01)
00:06.0 USB controller: Apple Inc. KeyLargo/Intrepid USB
00:07.0 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)


Display USB Devices

lspci

Display information about USB buses in the system and devices connected to them. If this command is not available, try installing a package named "usbutils".

Options:

  • -v: Be verbose (-vv for very verbose).

For example:

[texpion@com ~]$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 003: ID 04b3:3025 IBM Corp.


Display Block Devices

lsblk

Display information about block devices. A block device is a computer data storage device. Useful when trying to format a block device.

Options:

  • -v: Be verbose (-vv for very verbose).

For example:

[texpion@com ~]$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  100G  0 disk 
└─sda1   8:1    0  100G  0 part /



Related

Comments

Popular

Intel 7th and 8th generation processor graphics driver for Windows 7/8/8.1

AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part II - Fidelity

AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part IV - Decode

AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part I - Lossless

AV1 vs VP9 vs AVC (h.264) vs HEVC (h.265): Part III - Quality

OBS Studio settings for best quality (loseless) recording

Install VMAF on Fedora, CentOS/Red Hat (RHEL)