lspci | grep -i [device]
The command lspci | grep -i [device] is used in Linux to filter and display specific
PCI (Peripheral Component Interconnect) hardware components attached to your system's motherboard.
The lspci utility lists all PCI devices.
We then pipe(|) the list to grep and parse it looking for the
given string [device]. When using a simple, single word expression, wrapping it in quotes isn't
required. More complex expressions would be though. We always wrap them in quotes, for consistency.
So, I guess, the quotes are up to you. Here are a few commonly useful variations:
Variations
If your search does not provide enough details, you can expand the results with these flags:
Advanced Hardware Inspection Flags
-
lspci -v (Verbose): Displays
detailed driver configuration and memory allocation information.
-
lspci -nn (Show IDs):
Displays both the textual hardware name and its corresponding vendor/device ID numbers.
-
lspci -vnn | grep -i -A5 "vga"
(combination search): We tell it that we want; verbose output, to show IDs, and to show the next 5 lines
(-A5) as well as/ after the one our search matched.
-
sudo lspci -v (SU Verbose):
Sudo (SuperUserDo) runs the command as the administrator. Displays detailed driver configuration and
memory allocation information including hardware regardless of owner.
For more info, a little tldr;, visit our lspci Manpage.
lspci is part of the pciutils package.
You can use lsusb to get similar information on USB devices.
© VdStudioS 2026