Mounting an External USB drive on Ubuntu

Mounting an External USB drive on Ubuntu


1. First Create a directory on /media path
$mkdir /media/<dirname>

2. We must know what device we are dealing with and what filesystem it is formatted with. Most flash drives are FAT16 or FAT32 and most external hard disks are NTFS. to know the file system of the usb & its installed path, run the following command.  
$sudo fdisk -l


3. Mount the drive on the newly created directory (/media/<dirname>)

<for all file system otherthan ntfs>
$sudo mount -t vfat /dev/sdb1 /media/external -o uid=1000,gid=1000,utf8,dmask=027,fmask=137  (if fat file system)
<for ntfs>
$sudo mount -t ntfs-3g /dev/sdb1 /media/external

4. To unmount
$sudo umount /dev/sdb1



**Hope this helped, for more info/suggestions please write to tarz@techie.com

No comments:

Post a Comment