Skip to main content

The mkdir command is used to make a new directory. In DOS, OS/2 and Windows, the command is often abbreviated to md.

# To create a directory in current directory or given path:
mkdir <directory>

# To create multiple directories in the current directory:
mkdir <directory_1 directory_2 ...>

# To create directories recursively (useful for creating nested dirs):
mkdir -p <path/to/directory>