Mounting Linux File Systems: Essential Steps for Beginners
Mounting in Linux is a crucial operation to connect external storage devices (such as hard drives and USB flash drives) to the directory structure, enabling the system to read data from external devices as if they were local files. Since Linux directories follow a tree structure, external devices must be attached to the system's directory tree through a mount point (an empty directory). **Core Concepts**: Device name (e.g., `/dev/sdb1`) and mount point (e.g., `/mnt/usb`). Before operation, confirm the device name using `lsblk` or `fdisk -l`, and create the mount point with `sudo mkdir`. **Mounting Steps**: 1. Execute `sudo mount [device name] [mount point]`; 2. Verify success with `df -h` or `mount`; 3. Unmount using `sudo umount [mount point]`, ensuring no programs are accessing the device. **Common Issues**: Non-existent mount points, incorrect device names, and "device busy" during unmounting. Solutions include creating the directory, confirming the device, and exiting programs using the device. Temporary mounts are not persistent across reboots; permanent mounts require modifying `/etc/fstab`. **Summary**: By mastering device names, mount points, and the `mount/umount` commands, combined with `lsblk` to verify devices, you can successfully mount and access external storage.
Read More