MIAP Digital Literacy Command Line Guide

Learn about BASH commands!

View on GitHub

The mkdir Command

Summary

The mkdir command creates new directories or subdirectories. The command has a few options which are described below.

Basic command structure

For all descriptions below, the dollar sign indicates that BASH command prompt.

$ mkdir [options] [directory name]

Possible Flags

-m

The -m flag sets permission mode.

-p

The -p flag makes parent directories as needed.

-v

The -v flag prints a message for each created directory.

Output

The mkdir command has a few different kinds of outputs as described below:

Examples

Go back to the main list of commands