MKDIR(1)

✨ MKDIR(1) ✨ β€” General Commands Manual, but make it a vibe πŸŽ€

okay so welcome to the mkdir page bestie, from the General Commands Manual, and literally the whole personality of this command is "make the folder if it's not already there." that's it. that's the girl. she's simple, she's iconic, she ate πŸ’…


🌸 NAME 🌸

mkdir β€” Create the given DIRECTORY(ies) if they do not exist πŸ¦‹


🫢 SYNOPSIS 🫢

mkdir [OPTION]... DIRECTORY...

πŸ’œ DESCRIPTION πŸ’œ

Create the given DIRECTORY(ies) if they do not exist. no cap, that's the entire job description. she creates, she doesn't ask questions, she doesn't gatekeep ✨


πŸ’… OPTIONS πŸ’…

  • -m, --mode β€” set file mode (not implemented on windows) 😭
  • -p, --parents β€” make parent directories as needed 🧚
  • -v, --verbose β€” print a message for each printed directory πŸ‘‘
  • -Z β€” set SELinux security context of each created directory to the default type πŸ”₯
  • --context <CTX> β€” like -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX 🌈
  • -h, --help β€” Print help πŸ“
  • -V, --version β€” Print version ⭐
  • <dirs> β€” the dirs. that's the whole listing, bestie, the original gives no description here and we are NOT about to make one up πŸ’€

🌟 EXTRA 🌟

Each MODE is of the form [ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=]?[0-7]+. πŸ’–

like yes it looks like a cat walked across a keyboard, but it's genuinely important, so copy it exactly and don't get cute with it. iykyk.


πŸ¦‹ VERSION πŸ¦‹

v(uutils coreutils) 0.12.0 ✨


🌈 EXAMPLES 🌈

Create specific directories:

mkdir path/to/directory1 path/to/directory2 ...

Create specific directories and their parents if needed:

mkdir [-p|--parents] path/to/directory1 path/to/directory2 ...

Create directories with specific permissions:

mkdir [-m|--mode] rwxrw-r-- path/to/directory1 path/to/directory2 ...

Create multiple nested directories recursively:

mkdir [-p|--parents] path/to/{a,b}/{x,y,z}/{h,i,j}

The examples are provided by the tldr-pages project https://tldr.sh under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. πŸ™ˆ


lowkey important: those examples are on the CC BY 4.0 License, and also this is a work in progress situation so a couple of them might just not go how you expected. not me being dramatic, just being honest πŸ’€

and that's the whole page, bestie!! now go make some directories, you absolute main character πŸ‘‘

this was mkdir, page MKDIR(1) from the General Commands Manual, version v(uutils coreutils) 0.12.0, dated 2026-09-25 β€” putting that date here because the footer deserves its moment too πŸŽ€βœ¨

πŸ“¦ where this page comes from