On Linux there are different commands that can be used for listing and identifying hardware
components.
In this video we'll have a look at them.
So regardless of the state of the driver, Linux will always list devices.
The fact that you can see a device doesn't mean that Linux addresses it the right way.
If the appropriate driver is available, additional device information can be revealed.
The best way to find out is by using lspci-k.
That will scan for devices and drivers on the PCI bus, and if a driver was found, you'll
see the name of the driver.
There are some generic utilities to find out more about your hardware, and also utilities
that refer to specific device subsystems.
So let's have a look at the generic utilities, like lsdev, which is listing devices, lsusb,
which is listing devices on the USB bus, and lspci, which is about the PCI bus.
lsblk is also a part of the ls family.
It will list block devices.
lscpu, you probably guessed it, is listing your CPUs and their properties.
And dmessage can be convenient to get information about device initialization.
Let's check out these commands.
So lsusb is listing what is on the USB bus.
And there we can see all the different devices on the USB bus.
So I can see it's all VMware, and there's a mouse interface and a keyboard interface.
The most useful of them is lspci.
Lspci is listing devices on the PCI bus.
It's not very exciting in a virtual machine, but nevertheless, if you use lspci-k, look
for the kernel modules.
This is identifying the kernel module that is in use for a specific PCI device, which
is showing you whether or not the PCI devices are doing all right.
lsblk is for listing block devices.
So here I can see that I have two block devices, SR0 and NVMe0 and 1, where SR0 is my optical
disk and NVMe0 and 1 is my NVMe disk, which is a specific kind of SSD.
And on my NVMe, I have partitions.
We'll talk more about partitions later.
lsblk identifies what is going on.
lscpu is for listing CPUs and their properties.
Now I am on ARM, Apple Silicon to be precise.
And Apple Silicon does not reveal a lot of information.
If you're on Intel-based, you'll see much more information, like the clock speed, the
type of processor, and so much more.
But lscpu is an awesome way to find out what exactly your CPUs are doing.
And finally, there is dmessage.
Dmessage is not really about listing devices.
It's about showing the kernel or ring buffer, as we call it.
And in the kernel or ring buffer, messages are written that are related to what's going
on on your kernel.
So you can find device-related information, like right here, E1000.
Well, E1000, that happens to be my Ethernet controller, which is on the PCI bus.
So this relates to lspci.
And we can find more information, particularly about drivers and other kernel-level stuff
going on by using the dmessage utility.