lsblk command on Linux (list block devices)
The lsblk command on Linux shows information from all connected block devices in the system. It is useful to view all connected disks whether they are mounted or not.
The most common options are:
- -a, —all Show empty devices included;
- -d, —nodeps Shows information from just the device, without showing, for example, the partitions; - -f, —fs Shows detailed information about file systems;
Example of use:
sr0 11:0 1 1024M 0 rom The -d option shows the information, without the partitions:
The -f option may be useful to view the UUID of the devices:
sr0 Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.
Did you like it?
Share