MKDIR(1) User Commands MKDIR(1)

# [NAME](#NAME)

mkdir - make directories

# [SYNOPSIS](#SYNOPSIS)

**mkdir** \[*OPTION*]... *DIRECTORY*...

# [DESCRIPTION](#DESCRIPTION)

Create the DIRECTORY(ies), if they do not already exist.

Mandatory arguments to long options are mandatory for short options too.

[**-m, --mode=MODE**](#m,)

set file mode (as in chmod), not a=rwx - umask

[**-p, --parents**](#p,)

no error if existing, make parent directories as needed, with their file modes unaffected by any **-m** option

[**-v, --verbose**](#v,)

print a message for each created directory

[**-Z**](#Z)

set SELinux security context of each created directory to the default type

[**--context\[=CTX\]**](#context_=CTX_)

like **-Z**, or if CTX is specified then set the SELinux or SMACK security context to CTX

[**--help**](#help)

display this help and exit

[**--version**](#version)

output version information and exit

# [AUTHOR](#AUTHOR)

Written by David MacKenzie.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs to: &lt;bug-coreutils@gnu.org&gt;.  
Report any translation bugs to: &lt;https://translationproject.org/team/&gt;.  
GNU coreutils home page: &lt;https://www.gnu.org/software/coreutils/&gt;  
General help using GNU software: &lt;https://www.gnu.org/gethelp/&gt;

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;.  
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

# [SEE ALSO](#SEE_ALSO)

[**mkdir**(2)](/man/os/coreutils/mkdir.2)

Full documentation &lt;https://www.gnu.org/software/coreutils/mkdir&gt;  
or available locally via: info '(coreutils) mkdir invocation'

October 2026 GNU coreutils 9.12

---

Document: mkdir(1) from coreutils 9.12-r7 (Chainguard OS)
Source: https://git.savannah.gnu.org/git/coreutils.git
