Before we can mount a USB drive we need to gather some information about it. With the help of fdisk we can see that my 4GB USB drive was recognized as /deb/sdc1 and is formatted with FAT32.
1 | sudo fdisk -l |
Now create a mount point where the USB drive will be mounted. Only one drive per mount point.
1 | sudo mkdir /media/usb |
There is a good change your USB drive will be formatted with FAT16/32 therefore using the parameter -t vfat will suffice, otherwise you can use -t ntfs or -t ext3 depending on the file system.
1 | sudo mount -t vfat /dev/sdb1 /media/usb |
Make sure drive was mounted with the help of df -h. The 4GB USB drive is mounted and accessible from the /media/usb mount point.
1 | user@debian:~$ df -h |
To un-mount the drive you can simply use the umount command folowed the mount point.
1 | sudo umount /media/usb |