Linux Tip Of The Day - lsblk
Pizza courtesy of Pizza for Ukraine!
Donate Now to Pizza for Ukraine
I suspect a lot of these tips are going to end up being about storage – even today storage is such a pain point. The lsblk command shows you what block storage devices are hooked up to your Linux system. This is really useful for when you attach a new device and need to write a mount statement for /etc/fstab. Personally I use this a lot when I’m using different AWS volumes for organizing my storage.
There’s nothing to install – lsblk appears to be a standard command for most *nix systems.
Here’s an example of lsblk without any options:
Personally I find the -l option most useful:
Also useful is the -m option which shows permissions: