Linux tip: How to use the lsblk command


hi this is Sandra Henry stalker author
of the Unix as a second language blog a networked world in today’s Linux tip
we’re going to look at the LS block command or the LS blk command that
provides useful information on block devices
what are block devices they’re devices that are read and written to a block at
a time that’s usually 512 bytes the most common kind of block device of course is
a hard disk so with the LS block command you might see something like this whoa
what is all that well in this example we’re seeing a lot of snaps those are
all containerized software packages along with information on our regular
block devices we see hard disks and a cd-rom now if I want to omit the snaps I
can do this just use a grep command to hide some of the lines now I see a nice
easy-to-understand description of the block devices including the two hard
disks and the cd-rom we can see here that SDA the first disk has one
partition SD b2 has two and there’s our cd-rom there we also see the major and
minor device numbers whether the device is removable and only the cd-rom is we
see the size of the devices whether or not they any of them are read-only and
none of them are we see the device type whether it’s a disk a partition or a
cd-rom and the mount point so the block the LS block command provides useful and
easy to understand information about your block devices and is probably one
that you’ll use anytime you want a clear description of your system discs and
other block devices well that’s your two-minute Linux tip for today if you
liked this video please hit the like and share buttons for more Linux tips be
sure to follow us on Facebook YouTube and Network
worldcom

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *