↑ ↓ select, Enter open, Esc close

List disks and partitions

user@server
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,UUID

Lists block devices as a tree: drives, with partitions, LVM volumes and RAID arrays below them. You can see at a glance whether a newly added disk was detected and whether it is already formatted and mounted. The UUID is needed for stable entries in /etc/fstab.

Note: Without root, the UUID column may stay empty on some systems.

Also searched as

  • list disks linux
  • detect new disk on server
  • list partitions
  • get partition uuid for fstab

Related one-liners

All in Filesystem

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.