$ mkdir
Create directories
DOCUMENTEDFiles & directoriesUbuntu 24.04 LTS baseline
Synopsis
mkdir [OPTION]... DIRECTORY...
What it does
- `-p` creates missing parent directories and does not report an error if an existing directory is named.
- Permissions are affected by the process umask unless an explicit mode is supplied.
Examples
Create a directory
mkdir projectsCreate nested directories
mkdir -p projects/linux/commandsImportant details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.