Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When using the mount utility, if you specify a directory that does not exist, that is considered an error. Is there any option I can use so that mount points get automatically created if they don't already exist?

share|improve this question
add comment

2 Answers

up vote 8 down vote accepted

try this:

if you want to create a Mount Point called DISK1, then type the following command in the terminal :

sudo mkdir /media/DISK1
share|improve this answer
    
Thanks. I'll pick this answer in 3 minutes. –  Paul Dec 17 '11 at 21:18
    
i see it worked:) –  sum2000 Dec 17 '11 at 21:18
    
Yeah, I was hoping for an option to mount, but this is fine, I guess. –  Paul Dec 17 '11 at 21:20
    
you didn't mark the answer, care to share.? –  sum2000 Dec 17 '11 at 21:29
    
Chill. I went away from the computer and forgot about it. –  Paul Dec 17 '11 at 22:38
add comment

No, the bare mount utility do not offer such an option.

It is done when mounting from a file manager like Nautilus, though.

share|improve this answer
1  
how can Nautilus do it then? –  Andrea Borga May 4 '13 at 7:58
add comment

Your Answer

 
discard

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.