Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
MEPIS This forum is for the discussion of MEPIS Linux.


  Search this Thread
Old 05-16-2007, 08:41 AM   #1
Registered: Jan 2006
Distribution: Gentoo
Posts: 498

Rep: Reputation: 35
Question How to mount pendrive from terminal???

As you can see in the subject field, I am asking how to mount my USB pendrive form a terminal? I know that Mepis has an automount feature for such devices, but I created a user profile for my mom, and I didn't give mount rights for her. To be clear, I don't want to give mount rights for her. This user profile also works as an internet browsing profile too, so this little restriction makes the system more secure (there are some personal data on other partitions). So: the automount function doesn't work any more. I tried the mount command, but it says there is no such device or it is not in the fstab. I tried the mount command of course as root. Some months ago I was given an advice not to add entries for pendrives into the fstab, so I didn't add anything. So, my question: how to mount my pendrive from console (using root mode), without adding mount permissions to user profile, without adding anything to fstab and without typing kilometer long commands? Thanks for reading, and trying to answer.
Old 05-16-2007, 09:21 AM   #2
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Assume the pendrive is /dev/sda1 and you want to mount it at /media/pendrive, then you should be able to mount it as a priveleged user with
mount /dev/sda1 /media/pendrive
There is a wrapper called pmount that, IIRC, the Debian folks created to allow non-priveleged users to mount things such as pendrives. This might be something you want to install for mom. If you use pmount, the command would be
pmount /dev/sda1 /media/pendrive
Additionally, you might want to create and alias so mom doesn't need to type so much
alias pen='mount /dev/sda1 /media/pendrive'
Then mom just executes the command pen to mount the pendrive.
Old 05-16-2007, 09:23 AM   #3
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Assuming the device is sda1 (which it should be if you are using IDE drives and it is a standard format flash drive) you would do:

sudo mount /dev/sda1 /mnt/mountpoint
Where mountpoint is the actual directory you want to mount it to. You can either use one of the existing ones, or just create a new directory.
Old 05-16-2007, 09:53 AM   #4
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Could write a udev rule.

Could read writing udev rules and allow her to mount that one particular pen drive . thats what i do for my wife and debian auto mounts it but she can't mount anything else (like my usb drive) and i can't mount hers. The beauty of this is limiting access but still allowing the automount features.

Think mounting is something like:
sudo mount -t vfat /dev/sda1 /mnt/mountpoint

just make sure the mountpoint exist. this should work if you don't want a fstab entry.

Last edited by Hern_28; 05-16-2007 at 10:03 AM.
Old 05-16-2007, 12:55 PM   #5
Registered: Jan 2006
Distribution: Gentoo
Posts: 498

Original Poster
Rep: Reputation: 35
Cool Thanks!

Thanks Guys!
That method of Arow is extremely helpful. Thanks! I didn't know about that pmount prog, but now I do . Everything just works fine now.


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
Strange. My pendrive won't mount anymore Thakowbbery Linux - Hardware 4 09-28-2006 07:14 AM
pendrive mount myuran Linux - Hardware 1 04-15-2006 02:27 AM
Mount the Pendrive(Thum stick) sudhasmyle Linux - Hardware 2 11-24-2004 01:25 AM
usb pendrive mount eg72 Linux - Hardware 1 05-16-2004 12:20 PM
mount hangs with USB pendrive dex7er Slackware 2 11-24-2003 07:58 AM > Forums > Linux Forums > Linux - Distributions > MEPIS

All times are GMT -5. The time now is 06:11 AM.

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