Discover
lsblk
Tree of block devices
lsblk -f
Add filesystem, label, UUID, mountpoint
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
Pick your own columns
lsblk -p
Show full /dev paths
lsblk -J
JSON output for scripts
sudo blkid
List UUID, label and type of devices
sudo blkid <device>
Probe a single device
findmnt
Tree of mounted filesystems
findmnt <dir>
Which filesystem backs this mount point
findmnt -T <path>
Mount holding any path
findmnt -t ext4,xfs
Only some filesystem types
findmnt --real
Hide pseudo filesystems
findmnt -D
Output like df
findmnt -s
Read fstab instead of live mounts
findmnt -o TARGET,SOURCE,FSTYPE,OPTIONS
Choose columns
mount
List mounts (noisy, includes pseudo)
mount -t <type>
List mounts of one type
Mount and unmount
sudo mount <device> <dir>
Mount, type auto-detected
sudo mount -t <type> <device> <dir>
Force the filesystem type
sudo mount -o <opts> <device> <dir>
Mount with comma-separated options
sudo mount -r <device> <dir>
Mount read-only
sudo mount UUID=<uuid> <dir>
Mount by UUID
sudo mount -L <label> <dir>
Mount by label
sudo mount -m <device> <dir>
Create the mount point first
sudo mount -a
Mount all fstab entries not yet mounted
sudo mount <dir>
Mount using the fstab entry for <dir>
sudo mount -o loop <file.iso> <dir>
Mount an image file
sudo mount -o ro,loop <file.iso> <dir>
Mount an ISO read-only
sudo mount -f -v <device> <dir>
Dry run, verbose
sudo umount <dir>
Unmount by mount point
sudo umount <device>
Unmount by device
sudo umount -l <dir>
Lazy: detach now, clean up later
Use when busy and safe to detach; open files stay usable until
closed.
sudo umount -R <dir>
Unmount the whole tree below
sudo umount -f <dir>
Force (mostly for dead NFS)
Bind and remount
sudo mount --bind <dir> <other>
Make a directory visible at a second path
sudo mount --rbind <dir> <other>
Bind including submounts
sudo mount -o remount,ro <dir>
Switch a live mount to read-only
sudo mount -o remount,rw <dir>
Switch a live mount to read-write
sudo mount -o remount,noatime <dir>
Change options without unmounting
sudo mount --bind -o ro <dir> <other>
Read-only view of a directory
Needs util-linux 2.27+; older: bind, then remount,bind,ro.
sudo mount --move <old> <new>
Move a mount point atomically
sudo mount --make-private <dir>
Stop mount event propagation
sudo mount -t tmpfs -o size=<size> tmpfs
<dir>
RAM-backed scratch space
sudo mount -t nfs <host>:<export>
<dir>
Mount an NFS share
sudo mount -t cifs //<host>/<share> <dir>
-o username=<user>
Mount an SMB share
Needs the cifs-utils package.