Mounting Drives in Linux

Mounting makes a filesystem available at a directory path. Linux can mount internal disks, USB drives, network shares and disk images, but the exact command depends on the device and filesystem type.

Find the device

lsblk
blkid

Identify the correct partition before mounting. Do not guess device names on systems with important data.

Create a mount point

sudo mkdir -p /mnt/data

Mount the filesystem

sudo mount /dev/sdXN /mnt/data

Replace /dev/sdXN with the actual partition, for example /dev/sdb1. For NTFS, exFAT, NFS or SMB shares, extra packages or options may be required.

Unmount safely

sudo umount /mnt/data

Unmount removable drives before unplugging them to reduce the risk of data loss.

Leave a Comment