How to manually mount a USB drive in Linux?
To manually mount a USB drive to a Linux system, you need to follow these steps:
- Insert the USB drive to ensure that the system can correctly identify and detect it. You can use the command lsblk to view the list of storage devices on the system and confirm that the USB drive has been properly recognized.
- Create a directory for mounting a USB drive. You can choose to create a new subdirectory under the /mnt directory as the mount point. For example, run the command sudo mkdir /mnt/usb to create a directory named usb.
- Use the command “sudo fdisk -l” or “lsblk” to find the device name of the USB drive. Typically, the USB drive will be displayed as “/dev/sdX” where X is a letter identifier, such as “/dev/sdb”.
- Use the command “sudo mount /dev/sdX /mnt/usb” to mount the USB drive, where /dev/sdX is the device name of the USB drive and /mnt/usb is the previously created mount point.
- If the file system of the USB drive is not a format supported by Linux (such as NTFS or FAT32), you may need to install the corresponding file system tools. You can use the command sudo apt-get install ntfs-3g to install NTFS file system support, or sudo apt-get install dosfstools to install FAT32 file system support.
- After mounting is complete, you can use the command df -h to check the mount status and confirm that the USB drive has been successfully mounted to the specified directory.
- After using the USB drive, you can use the command “sudo umount /mnt/usb” to unmount it.
Please be aware that the ‘sudo’ command in the above steps requires administrative privileges, make sure you have sufficient permissions to perform mounting and unmounting operations.