Skip to content

The mkdir command

Make directories. Creates each directory you name. Without -p, the parent directory must already exist.

A practice shell in your browser that behaves like bash on Linux for these commands. Nothing you type leaves the page.

Usage

mkdir [OPTION]... DIRECTORY...

Options

-p, --parentsmake any missing parent directories too, and don’t complain if the directory exists
-v, --verboseprint a line for each directory made

Examples

  • mkdir musicOne new folder
  • mkdir -p notes/2026/octoberA folder and the ones above it

Learn it step by step