Useful Commands Beginning With “ls”

The “ls” command for listing directory contents has inspired a whole range of commands for listing other kinds of information. Here are a few I found in a quick search on my system: lsblk -- show block devices (disks, SSDs, SD cards, USB sticks etc). lscpu -- show information about your CPUs lsfd -- show information about open files (successor to lsof) lshw -- show detailed hardware information lsipc -- show state of Inter-Process Communication structures (message queues, shared memory, semaphores) lsirq -- show information about kernel hardware interrupt handling lslocks -- show information about filesystem locks lslogins -- show information about user IDs associated with processes on the system. This is not just regular user logins, but also user IDs allocated to system processes. lsmem -- show information about physical memory known to the kernel lsmod -- show state of loaded kernel modules lspci -- show information about PCI buses and connected devices. This will commonly include a lot of motherboard hardware, not just that in expansion slots. lsusb -- show information about connected USB devices. I think all these are from the util-linux package, which should be installed by default. Oh, and a bonus one that has nothing to do with system info as such: lsar -- handy tool for displaying the contents of various formats of archives, such as .zip, .tar and .7z files. Part of the “unar” package. Relevant manual pages (if these are not on your system): https://manpages.debian.org/lsblk(8) https://manpages.debian.org/lscpu(1) https://manpages.debian.org/lsfd(1) https://manpages.debian.org/lshw(1) https://manpages.debian.org/lsipc(1) https://manpages.debian.org/lsirq(1) https://manpages.debian.org/lslocks(8) https://manpages.debian.org/lslogins(1) https://manpages.debian.org/lsmem(1) https://manpages.debian.org/lsmod(8) https://manpages.debian.org/lspci(8) https://manpages.debian.org/lsusb(8) https://manpages.debian.org/lsar(1)
participants (1)
-
Lawrence D'Oliveiro