How to Make a Folder in Ubuntu

Techwalla may earn compensation through affiliate links in this story.
Create folders to organize your documents.
Image Credit: Prostock-Studio/iStock/GettyImages

If you're used to more user-friendly operating systems such as Windows, even simple tasks like creating a folder in Ubuntu might seem unusually difficult. In practice, it's simple to create a new directory, provided you know the Ubuntu create folder command and how to navigate to different directories. Using the "mkdir" command is the easiest way to make a new folder, but you have to make sure you're in the correct location before using the command.


Because you need to be in the correct location before creating the folder through the Terminal, you should know how to navigate between folders using it. By default, you start in your "Home" directory, but you can type "pwd" into the command line to see where that is if you don't know. You can also use the "cd" command to navigate between folders, remembering to start from your Home folder.

Video of the Day

For example, to go to "Music" inside "Documents" in your Home directory, you type "cd /home/Documents/Music/" (without quotations) and choose "Enter." You can also go up to the previous directory by typing "cd" with nothing after it. Use this method to navigate to the directory where you want to make your new folder, noting that you can also type "ls" to list the files and folders in your current directory.


Ubuntu Create Directory With 'mkdir'

The basic Ubuntu create folder command is "mkdir," literally "make directory." Make sure you're in the location you want to create your new folder and then type "mkdir" followed by a space and the name of the folder you want to create. For example, if you've navigated to "Music" as in the previous example and you want to create a folder entitled "Tom_Waits," you type "mkdir Tom_Waits" into the command line in Terminal.


Additional Options With 'mkdir'

There are a couple of extra things you can do when you're making a directory in Ubuntu using the "mkdir" command. If you want to create a bunch of subfolders along with the original folder, you can type "-p" after "mkdir" and a space and then type out the whole string of folders and subfolders you want to make. For example, "mkdir -p /Albums/Rock/Led_Zeppelin/" would make an "Albums" folder with "Rock" inside it and "Led_Zeppelin" inside that, all in a single command.


If you want to make multiple folders in the same directory in a single command, you type multiple folder names after the command, separated by a space. For example, you can type "mkdir Rock Blues Jazz Rap" to make four folders named "Rock," "Blues," "Jazz" and "Rap" inside your current folder.

Ubuntu offers much more flexibility than this. For example, you can make multiple folders and subfolders in a single place by combining these two approaches in the right way. Start with "mkdir -p" as in the first example and then use curly brackets "{}" to enclose multiple folders in the same directory (separated with a comma this time), and "/" to indicate a subfolder. So you could type "mkdir -p Albums/{Blues,Jazz,Rock/{Led_Zeppelin,Rolling_Stones,Guns_n_Roses},Rap}" to create the four folders from the previous example, inside "Albums" and with subfolders in "Rock" for Led Zeppelin, the Rolling Stones and Guns n' Roses.


Using Nautilus

If you're using Nautilus as a file manager in Ubuntu, you can make a folder much more simply. Use the "File" menu to create the folder, but it's much easier to press "Ctrl," "Shift" and "N" together to create one. Then give the folder a name in the usual way, and you're good to go.