View Full Version : [ubuntu] Mkdir: cannot create directory

July 24th, 2012, 06:56 PM

I have really minimal knowledge of Linux so bear with me please.

I was trying to install vnc in ubuntu server 12.04 following this guide

I think I didn't exit root as instructed and now I get the following error:
mkdir: cannot create directory `.vnc': File exists

My problem is similar to this http://bit.ly/NTMSVc

I tried some of the suggestions in my last link to no avail so I am basically stuck.

Any help much appreciated.

Thank you.

July 24th, 2012, 06:58 PM

su mkdir dirname


July 24th, 2012, 07:03 PM
it gives the error when you follow the instructions part "mkdir .vnc"?

just ignore the failure, mkdir creates a folder, if it already exists there is nothing to do.
mkdir -p is often preferable as it recursively creates folders and ignores failures due to it already existing
don't create it with su, that will likely just cause permission issues.

July 24th, 2012, 07:11 PM

su mkdir dirname


That's not going to work- it'll just try to su to a user called "mkdir". Try either of these-

sudo mkdir dirname
su -c mkdir dirname

July 29th, 2012, 10:58 PM
Hello guys,

Sorry for not getting back earlier and thanks to each one of you who replied.

A friend helped me out in the end so not sure how he fixed it but I have taken note of all your suggestions for future reference.

Many thanks. :)