LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-18-2008, 09:45 PM   #1
KHOO YIH CHYUAN
LQ Newbie
 
Registered: Dec 2008
Posts: 1

Rep: Reputation: 0
Arrow how to mount usb thumb drive


hi all,
what command should type for mounting a usb thumb drive. please help me to solve this problem. Thank you.
 
Old 12-18-2008, 10:34 PM   #2
saagar
Member
 
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
In Red Hat Linux:

1.When we plug in the usb drive, automatically it will be mounted and u can see the USB symbol and manufacturer name of the thumb drive in the Desktop or when we click the "computer" icon. From there we can access the USB drive.
2.Else, we can manually mount it from the command line:
a.[ ]#mount /dev/sda1 /mnt
Note: (thumb drive is detected as a SCSI (sda) subsytem in Red Hat Linux)
[ ]#cd /mnt
[ ]# ls



Hope this helps.
 
Old 12-18-2008, 10:37 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Which distro are you using? Please put it in your user profile. If you are using SuSE linux, you can use the "halmount" command to automount the device in the /media directory.

If you don't know the device used, you can use "halmount --udi" to list each device and the devices udi. If the pendrive has a label, "halmount <label>" will work as well.

You can also use the mount command. See the "man mount" manpage.
Here is how an sd card is mounted on my desktop:
/dev/sdf1 on /media/disk type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)

I could have manually mounted it for example:
sudo mkdir /mnt/disk
sudo mount -t vfat /dev/sdf1 /mnt/disk -o rw,nosuid,nodev,noatime,flush,uid=jschiwal,utf8,shortname=lower

The uid option is needed for a fat32 formatted pendrive to change the ownership. This gives me permission to read and write to the drive. The "nosuid,nodev" options are standard for non linux filesystems or globally writable partition. They can prevent accidentally running malware that someone put on the pendrive.
The noatime option extends the life of the device. Pen drives have a limited number of write cycles. So you don't want the access times updated after reading a file. ( plus fat32 doesn't support access times anyway )

Notice the advantage of the halmount command. I didn't need to be root to mount the device.

Are you running a very old distro, or a minimal desktop environment. Using KDE or Gnome on a recent distro, the drive should be automounted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to mount USB thumb drive in Knoppix? bezdomny Linux - Newbie 3 03-31-2009 09:34 PM
Mount usb thumb drive in my laptop DanielTan Linux - General 2 12-20-2007 12:44 PM
How to mount usb thumb drive second partition gsuresh_01 Linux - Newbie 2 12-20-2007 12:40 PM
How do you mount a usb thumb drive? stakhous Linux - Hardware 16 03-04-2006 04:41 AM
USB Thumb Drive Will Not Mount Unless Present During Boot. IamI Slackware 21 02-21-2006 03:40 PM


All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration