The list that follows provides an overview of the most important commands. Of course, a lot more commands are available for examining the innards of a Linux system.
lspci
lspci lists all the components on the PCI bus. The option -vv returns a detailed list, while -vn returns only the device IDs. Please mind to execute lspci as root.
grep
grep is the most commonly used command for searching the contents of files on Unix/Linux. Important: grep is case-sensitive. You can disable case-sensitivity with -i.
For example:
Without -i:
linux:~ # lspci | grep controller
00:06.0 SCSI storage controller: Adaptec AHA-2940U2/W / 7890
00:09.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 22)
00:0a.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 06)
01:00.0 VGA compatible controller: nVidia Corporation Riva TnT 128 [NV04] (rev 04)
and with -i. The USB controller is also included in the list.
linux:~ # lspci | grep -i controller
00:04.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01)
00:06.0 SCSI storage controller: Adaptec AHA-2940U2/W / 7890
00:09.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 22)
00:0a.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 06)
01:00.0 VGA compatible controller: nVidia Corporation Riva TnT 128 [NV04] (rev 04)
The pipe character | passes the output of the first command to the second, thus saving you a step. Otherwise, the output from lspci would have to be routed to a file (with >), which would then have to be retrieved by grep:
linux:~ # lspci > file
linux:~ # grep controller file
Bookmarks