1 00:00:06,580 --> 00:00:11,519 An average Linux distribution has quite a few commands that allow you to list 2 00:00:11,519 --> 00:00:16,460 hardware devices, like lshw, which gives an overview of all currently installed hardware. 3 00:00:17,250 --> 00:00:23,010 LSCPU, which lists CPUs and their properties, or LSBLK for listing block devices. 4 00:00:23,710 --> 00:00:30,089 LS PCI shows devices on the PCI bus, LSUSB devices gives a list of USB devices. 5 00:00:30,750 --> 00:00:34,850 Then we have lsmem, which lists memory devices, and finally LS 6 00:00:34,850 --> 00:00:38,950 initrd, which is showing what is inside the initrd file. 7 00:00:39,570 --> 00:00:45,835 Remember, the initrd file is this file that is helping the kernel to boot properly. Let me show you these utilities, 8 00:00:45,835 --> 00:00:52,100 but do notice that not all utilities by default installed on all distributions. So let's see how far we get. 9 00:00:53,740 --> 00:00:56,899 So I'm using sudo I to start with. 10 00:00:57,609 --> 00:00:59,530 No, let's not do that. Forget that. 11 00:01:00,049 --> 00:01:05,439 So let me use lshw and lshw. Oh my goodness, do you see that? A lot 12 00:01:05,439 --> 00:01:10,829 of information. But it's also telling us that you should run this program as super user. 13 00:01:11,310 --> 00:01:18,030 So that means sudo lshw and I'm piping it through less because as you can see, it doesn't fit on one screen. 14 00:01:18,829 --> 00:01:25,640 And here we have very detailed information about all the hardware in your system, 15 00:01:25,640 --> 00:01:32,450 including the memory banks in your memory slots, you, name is there, I repeat, 16 00:01:32,450 --> 00:01:39,260 really a lot of information, so much that it's a bit complicated. 17 00:01:40,140 --> 00:01:46,930 You better use the more specialized commands if you're looking for something specific, like lscpu, which 18 00:01:46,930 --> 00:01:53,720 is showing information about my cpu, this is merging the information from Prox cpuinfo with other 19 00:01:53,719 --> 00:02:00,510 information that it has found to be as complete as possible about your cpu. 20 00:02:01,010 --> 00:02:06,190 So look here it has found Apple Silicon. That's because even if I'm in virtualization, it 21 00:02:06,190 --> 00:02:11,370 is directly addressing my Apple Silicon CPU. It has found two CPUs and we get information 22 00:02:11,370 --> 00:02:16,550 about so much more, like the cache that it is using and so on. 23 00:02:17,669 --> 00:02:23,235 Now LSBLK is listing block devices, we have already seen it lsblk, 24 00:02:23,235 --> 00:02:28,800 which is convenient for managing removable devices, but also for hard disks. 25 00:02:29,689 --> 00:02:33,050 And LSPCI is listing the PCI bus. 26 00:02:33,789 --> 00:02:37,250 So you can just type LSPCI for a short list. 27 00:02:37,770 --> 00:02:44,745 But in many cases you do this to figure out which kernel modules are loaded. And here we can see all the 28 00:02:44,745 --> 00:02:51,719 different kernel modules that are available. We have already seen LSUSB for listening what is going on on the USB bus. 29 00:02:52,460 --> 00:02:55,060 And a little bit less common is lsmem. 30 00:02:55,659 --> 00:02:59,219 LSMEM is showing your memory configuration. 31 00:02:59,979 --> 00:03:04,843 Now a memory configuration on a normal system is not spectacular, 32 00:03:04,843 --> 00:03:09,706 but if you are using non uniform memory access or numa, 33 00:03:09,706 --> 00:03:14,569 then LSMEM is giving interesting information about your memory topology. 34 00:03:15,229 --> 00:03:20,349 And finally LS initrd is showing what is going on in the initrd. 35 00:03:20,909 --> 00:03:27,796 The initrd is a complete file system that contains a directory structure, but it also contains drivers. And if ever 36 00:03:27,796 --> 00:03:34,683 you need to figure out which drivers are available, well, look, here they are on the top of the list 37 00:03:34,683 --> 00:03:41,569 and that might help you in determining if you need to install additional drivers to your init RD or not. 38 00:03:42,349 --> 00:03:48,919 That's enough for the LIS hardware utilities. They are convenient and they really help in discovering what is going on on your.