Monday, May 23, 2011

How to mount usb flash drives in linux.

First plug your usb card reader and to make sure your device was detected go to System Tools > Hardware Browser > enter root password and it will display your hardware information then go to > Hard Drives and it should be listed under /dev/sda.

Open your favorite terminal....btw this works in gnome and kde.



[imdeemvp@localhost imdeemvp]$ cd /mnt/ <-as user cd yourself to the mnt folder and become root to create directory
[imdeemvp@localhost mnt]$ su
Password:
[root@localhost mnt]# mkdir usbflash <- this created a directory in the mnt folder

[root@localhost mnt]# ls /mnt/ <-this command listed all my directories the mnt folder
cdrom cdrom1 floppy usbflash

[root@localhost mnt]# mount /dev/sda1 /mnt/usbflash <-this is the command to mount flash card reader

[root@localhost mnt]# ls usbflash <-this listed all the info in my usb flash card and this was the output:
bootex.log dns.bmp games and keys LinuxDocs01.21.04 pc's
dns2.bmp Documents LinuxDistributions_eBay my pics programs

then i just copied this to my home folder and i was done!

[root@localhost mnt]# umount /dev/sda1 /mnt/usbflash <-this unmounted my usb flash card
umount: /dev/sda1: not mounted
[root@localhost mnt]# exit
[imdeemvp@localhost mnt]$


THIS ALSO WORKED UNDER Mandrake 9.1, 9.2, and 10 official.

in terminal type as root: gedit /etc/fstab and NOW YOU CAN ADD THIS LINE TO FSTAB to auto mount it:

Code:
/dev/sda1 /mnt/usbflash vfat noauto,users,rw,umask=0 0 0


Adding "rw" allows to read and write in the usb flash drive. HAVE FUN!!
UPDATED 11.28.04
Please note that under FC3 it automounts in your desktop. It is plug and play.


VIA

No comments:

Post a Comment