MKDIR(1)

πŸ“¦
version 9.10 Β· 5 versions
, in ubuntu stonking

πŸ’– MKDIR(1) β€” User Commands πŸ’–

okay bestie, welcome to the User Commands section of the manual, and today's main character is mkdir. yes, the girl who makes folders. she's been doing this since forever and she's iconic for it. let's go ✨


🌸 NAME 🌸

mkdir β€” make directories

like. that's it. that's the job. she makes directories. and she ate. periodt πŸ’…


✨ SYNOPSIS ✨

mkdir [OPTION]... DIRECTORY...

so you give her some <italic>OPTION</italic>s (optional, she's flexible like that), and then one or more <italic>DIRECTORY</italic> names that you want her to create. the directories are the non-negotiable part, the options are the vibe. πŸ¦‹


πŸ‘‘ DESCRIPTION πŸ‘‘

Create the <italic>DIRECTORY</italic>(ies), if they do not already exist.

fr fr, that's the whole assignment. she makes the directories. if they're already there, she's not gonna make a scene about it. πŸ’–

⚠️ lowkey important: Mandatory arguments to long options are mandatory for short options too. so if an option needs a value, she needs it. no value, no service. ngl that's just how it is.

πŸŽ€ OPTIONS πŸŽ€

  • -m, --mode=MODE β€” sets the file mode (same energy as chmod), and btw it's not a=rwx - umask. it is absolutely not that. don't come at her with that. πŸ™ˆ
  • -p, --parents β€” no error if it's already existing, and she'll make the parent directories as needed too. oh and heads up: with -p, those parent dirs get their file modes unaffected by any -m option. yes really. pay attention bestie πŸ’…
  • -v, --verbose β€” she prints a lil message for each directory she creates. she's a yapper, she wants you to know what she did. πŸ—£οΈβœ¨
  • -Z β€” sets the SELinux security context of each created directory to the default type. security queen behavior πŸ‘‘
  • --context[=CTX] β€” like -Z, but if <italic>CTX</italic> is specified then she sets the SELinux or SMACK security context to that <italic>CTX</italic>. note the brackets: the =CTX part is optional, the vibe is not.
  • --help β€” displays this help and dips. 🫢
  • --version β€” outputs version information and exits. she'll tell you who she is and then leave. main character exit. ⭐

πŸ¦‹ AUTHOR πŸ¦‹

Written by David MacKenzie. ty king, we appreciate you πŸ«‘πŸ’œ


😭 REPORTING BUGS 😭

found a bug? no cap, tell the devs:

they wanna hear it, fr fr. don't sit on it. πŸ“¬


🌈 SEE ALSO 🌈

Full documentation <https://www.gnu.org/software/coreutils/mkdir> or available locally via: info '(coreutils) mkdir invocation'

Packaged by Ubuntu (9.10-1ubuntu2) Copyright Β© 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.


okay that's the whole page, you're basically a mkdir expert now, no notes πŸ’–βœ¨

GNU coreutils 9.10 β€’ August 2026 β€’ MKDIR(1) β€” and that's the sign-off bestie, mwah, go make some directories, slay πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from