Usage And Variation

  1. mkdir dir1/dir2/dir3 Creates a nested directory
  2. mkdir -v This prints out a message for each directory created
  3. mkdir -p This creates a "parent" directory but will not give off an error message if the directory already exists

What is the MKDIR command?

Creates a directory in the current location of the user or at a given location. Unless specified, the directory will be empty. The name of the directory is given as an argument to the command. Directories can be nested into each other.



In the example above, the user created a new directory called NewDirectory. This also displays the other directories that are in the same location.

Try it: