System
mount & umount
mount and umount commands for filesystem management.
31 commands
Windows
MacOS
Linux
#filesystem
#storage
Basic Mount/Umount
Mount a device to a directory
mount /dev/sdb1 /mnt/data
Unmount a filesystem
umount /mnt/data
Show all mounted filesystems
mount
Lazy unmount a busy filesystem
umount -l /mnt/data
Force unmount an NFS share
umount -f /mnt/nfs
Check if a directory is a mountpoint
mountpoint /mnt/data
Filesystem Types
Mount ext4 filesystem
mount -t ext4 /dev/sdb1 /mnt/data
Mount XFS filesystem
mount -t xfs /dev/sdc1 /mnt/xfs
Mount NTFS filesystem
mount -t ntfs /dev/sdd1 /mnt/win
Mount FAT32 filesystem
mount -t vfat /dev/sde1 /mnt/usb
Mount NFS share
mount -t nfs 10.0.0.5:/share /mnt/nfs
Mount SMB share
mount -t cifs //srv/share /mnt/smb -o user=admin
Options
Mount as read-only
mount -o ro /dev/sdb1 /mnt/data
Mount read-write without exec
mount -o rw,noexec /dev/sdb1 /mnt
Remount with new options
mount -o remount,rw /mnt/data
Mount with ownership
mount -o uid=1000,gid=1000 /dev/sde1 /mnt/usb
Mount without access time updates
mount -o noatime /dev/sdb1 /mnt/data
fstab
View filesystem table
cat /etc/fstab
Mount all fstab entries
mount -a
Show mounted filesystems as tree
findmnt
Show only ext4 mounts
findmnt -t ext4
List block devices with filesystems
lsblk -f
Show block device attributes
blkid
Loop Devices
Mount an ISO image
mount -o loop image.iso /mnt/iso
Attach image to next free loop device
losetup -f image.img
List all loop devices
losetup -a
Detach a loop device
losetup -d /dev/loop0
Mount a loop device
mount /dev/loop0 /mnt/img
Quick Commands
Mount a device to a directory
mount /dev/sdb1 /mnt/data
Mount an NFS network share
mount -t nfs 10.0.0.5:/share /mnt/nfs
Mount an ISO image file
mount -o loop image.iso /mnt/iso