O'Reilly logo

Ubuntu Unleashed 2013 Edition: Covering 12.10 and 13.04, Eighth Edition by Matthew Helmke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Directory with mkdir

To create an empty directory called newdirectory within your current directory, use this command:

matthew@seymour:~$ mkdir newdirectory

You can create a directory in a different location by changing what is after mkdir. To create a new directory in /home/matthew/music, if I am already in my /home directory, I can use the following:

matthew@seymour:~$ mkdir music/newdirectory

Or from anywhere using an absolute path, I can use this:

matthew@seymour:~$ mkdir /home/matthew/music/newdirectory

Or from anywhere using a path shortcut, I can use the following command:

matthew@seymour:~$ mkdir ~/music/newdirectory

The -p option is valuable. It enables you to create a directory and its parent directories at the same time, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required