Mounting an external USB Flash/Thumb /Hard Drive

When you plug a USB thumb drive into a modern Linux system it is automatically mounted onto the disk (file system) and appears on the desktop depending on the distribution (distro) youre using. But there might be some situations that prevents a an external file system (like in an external thumb drive or hard disk) from being mounted like in a situation when accessing a Linux server from the command line without GUI utilities. Whatever the case we would doing some manual mounting in the steps that follow.


Login as root (or use sudo) or switch to root using the su command



Plug in the USB memory device: to check if the USB memory device is present, it would appear as a directory named something like usb-storage-0 under the /proc/scsi directory (i.e. /proc/scsi/usb-storage-0). If this /proc/bus directory does not exist or is not found in your system then you have to recompile your kernel or update it. Another way to check if the usb device is present is to type the following command;

less /proc/scsi/usb-storage/2

This would open a file in that location and if the last line entry is yes it means the device is plugged in, if No then it is not plugged in. You can remove the device and repeat STEP 2.

After successfully plugging the USB device and being recognized by the system. Use the dmesg command to see what name is assigned by the system to the device. It should be in the form of sda1 or sdb1, this is what you would use when mounting (mine is sdb1 here)

Create a mount point directory usually inside the mnt directory.

mkdir –m 777 /mnt/my_usb_flash


READ  The Linux File System – Part 3: A forbidden tree? No!

You can name it whatever you want or can remember, Im using my_usb_fash.

Then you can now mount the usb memory drive to the mount point directory you created in step 4.

mount –t vfat /dev/sdb1 /mnt/my_usb_flash

If successful, to see files on the usb enter;

cd /mnt/my_usb-flash

And then;

ls –a

Or simply use the following command to list the files and directory on the connected drive;

ls –al /mnt/my_usb_flash

Then you done.

Happy Linux’NG!




Chief Editor/Founder at FossNaija
A Linux enthusiast with a focus on enriching the Nigeria Linux experience and keeping a keen eye on Ubuntu and other Foss related developments.

Tell us what you think

This site uses Akismet to reduce spam. Learn how your comment data is processed.