October 4th, 2005, 20:26 PM
How to mount usb flash drives in linux
I found that the latest Slackware 10.2 does not mount USB-key automatically so I've decided to post this tip that could be used in other distro that don't automount these devices in your desktop.
Note: USB storage devices are shown as SCSI drives in Linux, so if you have more than a SCSI device you can find different device names (/dev/sdXX where XX depends on your hardware). In this example I've chosen the first device in the SCSI chain (/dev/sda1)
- Open a console window (under KDE is called konsole)
- Login as root: type su and enter the password
- Change directory: cd /mnt
- Create a new directory: mkdir usbkey (if not exists)
- Try to mount your USB-key: mount /dev/sda1 /mnt/usbkey
- If it doesn't works you may try another device (e.g. /dev/sda2)
- If it works you can list the files in the key: ls /mnt/usbkey
- Unmount the device: umount /mnt/usbkey
- Open for edit the file /etc/fstab with a text-editor
- Add this line: /dev/sda1 /mnt/usbkey vfat noauto,users,rw,umask=0 0 0
- Save and close the file
- Leave the root user: press CTRL+D or enter the command exit
- Now you can mount the key from your account: mount /mnt/usbkey
- For unmounting the key: umount /mnt/usbkey
October 4th, 2005, 21:36 PM
Old, Cranky and Perverted
excellent info carloc. Thanks!
May 8th, 2010, 18:56 PM
Ubuntu mounts these just fine, at least mine does. In fact I haven't had to mount anything in ages... on occasion I'll mount a young girl for a test drive around the track... but in terms of my OSes no manual mounting necessary. Slackware should fix this to automatically be done in future versions.