I'm constantly having the situation where I want to correlate the output of lsblk
which prints devices in a tree with their name in the scheme of /dev/sdXY
with the drives /dev/disk/by-id/
names.
Linux – Make lsblk list devices by-id
linuxlsblk
Best Answer
The by-id names consists of the drive model together with the serial something which
lsblk
can be instructed to list:The output of this command will look something like this:
For posterity here's also a longer command with some commonly used columns:
The output of which could be: