lsblk — quick referenceDefault listingShow the block-device tree with name, size, type, and mount points — no root required.When to useCommandDefault tree of all block deviceslsblkLimit output to one disk and its childrenlsblk /dev/sdaList format (one line per device, no tree branches)lsblk -lShow disks only — skip partition childrenlsblk -dHide empty devices with no holderslsblk -AFilesystems and identifiersSee filesystem type, UUID, and usage alongside block layout.When to useCommandAdd filesystem type, label, UUID, and use% columnslsblk -fPrint full/dev/...paths in the NAME columnlsblk -pPrint sizes in bytes instead of human unitslsblk -b /dev/sdaShow owner, group, and device node permissionslsblk -m /dev/sdaColumns, filters, and layoutPick columns, sort, and hide device classes you do not care about.When to useCommandChoose explicit columnslsblk -o NAME,SIZE,TYPE,MOUNTPOINTSExclude devices by major number (hide loop devices: major 7)lsblk -e7ASCII tree characters only (safe for logs)lsblk -iTree layout with the-Tformatterlsblk -TSort by a column (for example size)lsblk -x SIZESkip the header rowlsblk -nDependencies, topology, and scriptingTrace holders, inspect queue settings, or emit JSON for scripts.When to useCommandShow inverse dependencies (which disk holds this partition)lsblk -s /dev/sda1Print topology columns (alignment, scheduler, rotational)lsblk -tJSON output for parserslsblk -JList available output column nameslsblk --list-columnsHelp and versionWhen to useCommandShow brief usagelsblk --helpShow util-linux versionlsblk --versionlsblk — command syntaxSynopsis fromlsblk --helpon Ubuntu 25.04 (util-linux 2.40.2):textCopylsblk [options] [device ...]lsblkreads the kernel block layer and udev; it does not change partitions or filesystems. Pair it with parted orfdiskwhen you need to create or resize partitions.lsblk — command examplesExpand or collapse all examples below to scan titles quickly or open every step at once.Expand allCollapse allRunlsblkwith no arguments when you want a quick map of disks, partitions, LVM volumes, and loop devices on the host.Run the command:bashCopylsblkSample output:outputNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 4K 1 loop /snap/bare/5 sda 8:0 0 25G 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 2G 0 part /boot └─sda3 8:3 0 23G 0 part └─ubuntu--vg-ubuntu--lv 252:0 0 58.4G 0 lvm / sdb 8:16 0 35.4G 0 disk └─ubuntu--vg-ubuntu--lv 252:0 0 58.4G 0 lvm /Tree branches show parent/child relationships:sda3is a partition; the LVM logical volume underneath is where/is mounted.TYPEtells you disk, part, lvm, or loop.Before mounting or editing/etc/fstab,-fadds filesystem columns so you can match UUIDs without a separateblkidcall.Run the command:bashCopylsblk -f /dev/sdaSample output:outputNAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS sda ├─sda1 ├─sda2 ext4 1.0 c254a326-948a-4ae2-993b-1659f4ddcf03 1.5G 17% /boot └─sda3 LVM2_member LVM2 001 xLar7A-0CSb-mAmp-Y2sy-s6KG-FtEP-kIBAUL └─ubuntu--vg-ubuntu--lv ext4 1.0 72457fae-1731-4c94-b5c1-ac4564f4311c 35.5G 34% /FSTYPEon the partition showsLVM2_memberwhen that partition is a physical volume; the filesystem type appears on the logical volume row.Pass a device path to limit the tree to that disk — handy on servers with many SAN LUNs.Run the command:bashCopylsblk /dev/sdaSample output:outputNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 25G 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 2G 0 part /boot └─sda3 8:3 0 23G 0 part └─ubuntu--vg-ubuntu--lv 252:0 0 58.4G 0 lvm /MAJ:MINis the kernel major:minor number.ROset to1means the device is read-only (common for squashfs loops).Desktop Ubuntu hosts often have dozens of snap loop devices. Major number7is the loop driver — exclude it to see only real disks.Run the command:bashCopylsblk -e7Sample output:outputNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 25G 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 2G 0 part /boot └─sda3 8:3 0 23G 0 part └─ubuntu--vg-ubuntu--lv 252:0 0 58.4G 0 lvm / sdb 8:16 0 35.4G 0 disk └─ubuntu--vg-ubuntu--lv 252:0 0 58.4G 0 lvm / sr0 11:0 1 50.7M 0 rom /media/golinuxcloud/VBox_GAs_7.2.0Add more major numbers to the exclude list separated by commas if needed (-e7,11also hides the CD-ROM).-opicks exactly the fields you want.MOUNTPOINTSsupports multiple mount points per device on newer util-linux.Run the command:bashCopylsblk -o NAME,SIZE,TYPE,MOUNTPOINTSSample output:outputNAME SIZE TYPE MOUNTPOINTS loop0 4K loop /snap/bare/5 sda 25G disk ├─sda1 1M part ├─sda2 2G part /boot └─sda3 23G part └─ubuntu--vg-ubuntu--lv 58.4G lvm /Runlsblk --list-columnsto see every available column name on your build.When you are about to runmount,fsck, ordd,-pprints complete/dev/...paths so you do not guess the node name.Run the command:bashCopylsblk -p /dev/sdaSample output:outputNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS /dev/sda 8:0 0 25G 0 disk ├─/dev/sda1 8:1 0 1M 0 part ├─/dev/sda2 8:2 0 2G 0 part /boot └─/dev/sda3 8:3 0 23G 0 part └─/dev/mapper/ubuntu--vg-ubuntu--lv 252:0 0 58.4G 0 lvm /Copy paths directly into commands — still double-check before destructive operations.Scripts and configuration management tools often parse JSON more reliably than ASCII trees.Run the command:bashCopylsblk -J /dev/sdaSample output:output{ blockdevices: [ { name: sda, maj:min: 8:0, rm: false, size: 25G, ro: false, type: disk, mountpoints: [ null ], children: [ { name: sda1, maj:min: 8:1, rm: false, size: 1M, ro: false, type: part, mountpoints: [ null ] },{Pipe throughjqfor field extraction, for examplelsblk -J | jq .blockdevices[].name.If you have a partition device and need the parent disk (for example beforeddor cloning),-swalks upward.Run the command:bashCopylsblk -s /dev/sda1Sample output:outputNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda1 8:1 0 1M 0 part └─sda 8:0 0 25G 0 diskThe child appears first; parents stack below with tree markers.lsblk — when to use / when notUse lsblk whenUse something else whenYou want a readable tree of disks, partitions, LVM volumes, and mount pointsYou need filesystem type, UUID, or usage% next to device names (-f)You are scripting with JSON (-J) or custom columns (-o)You must confirm which disk holds a partition before resize or wipe (-s)You are troubleshooting missing mounts or unexpected loop devicesYou need to create or resize partitions → parted orfdiskYou need inode-level detail or bad blocks → filesystem tools (dumpe2fs,xfs_info)You are creating LVM physical volumes → pvcreate andvgdisplayYou only need UUID for fstab and already know the device →blkidYou want to mount a filesystem → mountlsblk vs fdisk / blkidlsblkfdisk -l / blkidLayoutIndented tree with holdersFlat list or one line per FSMount pointsBuilt inNot infdisk; partial inblkidLVM mappingShows LV under PV/partitionNeeds extra toolsChanges disksRead-onlyfdiskis for editing tablesUselsblkfirst for orientation; switch topartedorfdiskwhen you are ready to change partition tables.lsblk — interview cornerlsblklistsblock devices— kernel-level disk nodes under/dev— in a hierarchy. Disks sit at the top; partitions, LVM logical volumes, and device-mapper nodes appear as children. Columns usually include size, read-only flag, device type, and where the filesystem is mounted.It is read-only and fast. Admins run it beforefdisk,resize2fs, or LVM extend work to confirm they are targeting the correct device.A strong answer is:lsblk prints a tree of block devices — disks, partitions, LVM volumes, loops — with sizes and mount points. I use it as a read-only map before any disk-changing command.fdisk -lreads partition tables and prints geometry and partition types — it is the tool you use beforewritinga new table.lsblkshows how therunning systemsees devices, including LVM and mount points, in a tree. It does not display every partition-table fieldfdiskshows.Use both:lsblkfor layout and mounts;fdisk -lor parted when you need sector-level partition detail or plan changes.A strong answer is:lsblk is a live tree with mounts and LVM; fdisk -l is partition-table detail for editing. I start with lsblk for orientation, fdisk or parted when Im changing partitions.Snap and container tooling creates manyloopdevices (major number 7). Exclude them:bashCopylsblk -e7You can pass multiple majors:lsblk -e7,11drops loops and CD-ROM (sr0, major 11). On busy desktops this keeps the tree focused on real disks.A strong answer is:Loop devices are major 7 — I run lsblk -e7 to hide them when snap loops clutter the output.-faddsfilesystemcolumns:FSTYPE,UUID,LABEL, and usage percentages where available. That is exactly what you need when:Writing or checking/etc/fstabby UUIDConfirming which partition is ext4 versus LVM2_memberSeeing if/bootstill has free spaceIt replaces a separateblkidcall for a quick overview.A strong answer is:lsblk -f shows filesystem type, UUID, label, and use% beside the device tree — I use it before fstab edits or when tracing which partition holds which FS.Pass-Jfor JSON or-owith a fixed column list for grep-friendly lines. Add-nto drop headers in pipelines.bashCopylsblk -J -o NAME,SIZE,TYPE,MOUNTPOINTSParse withjqin shell or feed into Ansible facts. JSON includes nestedchildrenarrays that mirror the tree.A strong answer is:For scripts I use lsblk -J or lsblk -n -o with explicit columns, then parse with jq — it is more stable than scraping the ASCII tree.TroubleshootingSymptomLikely causeFixExpected disk missingDriver not loaded or multipath aliasdmesg, check/dev/disk/by-id/; install HBA driverPartition not listedTable not written or whole-disk FSsudo parted /dev/sdX print;fdisk -lMOUNTPOINTSempty but disk in useUnmounted or LVM not activatedmount;sudo vgchange -ayHuge loop device listSnap / flatpak loopslsblk -e7Wrong size shownRecent resize, kernel cachesudo partprobe; re-runlsblklsblk: command not foundutil-linux not installedsudo apt install util-linux