Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an extra hard drive which I use for backups. The label on its one and only partition is "backup". When I open nautilus and click on "backup" it mounds the drive in "/media/backup", and then there's a little eject button next to it's icon in nautilus.

If I manually mount the drive by creating a directory and using "sudo mount /dev/sdx /some/dir", the eject icon still shows up in nautilus, but when I press it I get an error because the device was not mounted via whatever it is that mounts it the other way.

What I would like is to be able to do this "mount to /media/backup and enable the eject button" via the command line. The goal is to have the device mounted by a script which needs the drive, but then leave it mounted until I manually eject it... if I want to.

P.S. I'm aware that I can have the drive auto mounted at startup, but that's not what I'm looking for here, and I'd like to know if this is possible.

Clarification: I'm looking for a command to "mount the drive the way nautilus would". This should create the directory "/media/backup", mount the device to that directory, and then when I press the eject button from nautilus, it should unmount the device and delete the directory.

share|improve this question
I'm struggling with something like this, but with an encrypted internal drive. Hope you figure it out. – Tom Brossman Mar 8 '12 at 9:57

Try adding -o user to your mount command.

share|improve this answer
well mount still requires that the directory already exist. The nautilus action 1) creates the directory and 2) mounts to it. – cheshirekow Nov 8 '11 at 1:30

you can automount, you can manually mount but you can't manually-automount!

Use gconf-editor or dconf-editor and change the preferences.




enter image description here

share|improve this answer
udisksctl mount -b /dev/yourblockdevice 

Worked for me. Adapted from

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.