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) you’re 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;
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
You can name it whatever you want or can remember, I’m 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;
Or simply use the following command to list the files and directory on the connected drive;
ls –al /mnt/my_usb_flash
Latest posts by ALEXANDER WAYNE OMOROKUNWA (see all)
- What is The Linux Swap Partition? - May 3, 2018
- 6 Commands you must know to be Productive on the terminal. - April 19, 2018
- Microsoft is Making love to Linux in the Windows store. - April 12, 2018