Disk listing, sizing & mounting

Linux Command Line Quick Reference

1 min read

Published Aug 18 2026


19
0
0
0

CLILinuxUbuntu

Several commands show different views of storage. lsblk shows block devices, df shows mounted filesystem capacity and du measures space used by files and directories.

Inspect disks and space

bash
lsblklsblk -fdf -hdf -hTdu -sh /pathdu -h --max-depth=1 /pathfindmntfindmnt /mount/point

lsblk -f includes filesystem type, label, UUID and mount points. df -h reports capacity in human-readable units and -T adds filesystem type. du -s gives a summary and -h makes sizes readable.

Mounting attaches a filesystem to the Linux directory tree:

Mount and unmount a filesystem

bash
sudo mkdir -p /mnt/datasudo mount /dev/sdb1 /mnt/datasudo umount /mnt/datamount | grep /mnt/data

mount without filesystem options usually detects the type automatically. umount detaches it. A filesystem cannot normally be unmounted while a process is actively using it.

Persistent mounts are normally configured in /etc/fstab, preferably using filesystem UUIDs shown by lsblk -f or blkid. A bad fstab entry can affect boot, so test changes with sudo mount -a before restarting.

© 2025 SimpleSteps.guide
AboutFAQPoliciesContact
Linux Command Line Quick Reference | Disk listing, sizing & mounting | SimpleSteps.guide