Creating Directories

Learn how to create multiple directories and paths using a single command.

The mkdir command

While we can create files in several ways, we’ll use the mkdir command to create directories. We learned how to use this command in Creating Directories in the introduction, but let’s dig in a little deeper by performing a common task: setting up a hierarchy of directories to store documents.

Let’s create a directory by the name of files:

$ mkdir files

Then, we use the ls command to verify the new directory exists:

$ ls -l

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy