MKNOD(1)
💅 MKNOD(1) 💅
okay bestie, welcome to mknod — it's a User Commands situation and honestly it's giving "low-level filesystem main character energy." let's get into it 🎀
✨ NAME ✨
mknod — make block or character special files. that's it, that's the whole vibe. special files, no cap. 🦋
✨ SYNOPSIS ✨
mknod [OPTION]... NAME TYPE [MAJOR MINOR]
✨ DESCRIPTION ✨
so basically: you create the special file NAME of the given TYPE. iconic behavior.
mandatory arguments to long options are mandatory for short options too — meaning if it's required for the long one, it's required for the short one, no skipping, periodt. 💀
🫶 the options 🫶
-m,--mode=MODE— sets the file permission bits toMODE, nota=rw - umask. yeah, it overrides that whole default thing. slay.-Z— sets the SELinux security context to the default type. security, but make it automatic ✨--context[=CTX]— like-Z, or ifCTXis specified then set the SELinux or SMACK security context toCTX. it's-Zwith options, iykyk.--help— display this help and exit. the "help me bestie" button 🥺--version— output version information and exit. knowing your version is self-care, fr fr.
🌸 the rules about MAJOR and MINOR 🌸
both MAJOR and MINOR must be specified when TYPE is b, c, or u. and they must be omitted when TYPE is p. no in-between, no "maybe," it's giving strict.
and the number-parsing lore?? okay so:
- if
MAJORorMINORbegins with0xor0X→ it's interpreted as hexadecimal - otherwise, if it begins with
0→ it's interpreted as octal - otherwise → it's interpreted as decimal
so like, 0x10 is 16, 010 is 8, and 10 is just 10. the leading zero really said "I'm different" 🙈
🦋 and TYPE may be: 🦋
b— create a block (buffered) special filec,u— create a character (unbuffered) special filep— create a FIFO
⚠️ heads up bestie: your shell may have its own version of mknod, which usually supersedes the version described here. please refer to your shell's documentation for details about the options it supports. so like… check before you assume, okay?? 😭
✨ AUTHOR ✨
written by David MacKenzie. king behavior, we love him 👑
✨ REPORTING BUGS ✨
found a bug? don't suffer in silence, tell someone 💖
- report bugs to:
bug-coreutils@gnu.org - report any translation bugs to:
https://translationproject.org/team/ - GNU coreutils home page:
https://www.gnu.org/software/coreutils/ - general help using GNU software:
https://www.gnu.org/gethelp/
✨ COPYRIGHT ✨
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. read that again bestie — NO WARRANTY, capital letters and everything. not a drill. 💀
✨ SEE ALSO ✨
mknod(2)- full documentation
https://www.gnu.org/software/coreutils/mknod - or available locally via:
info '(coreutils) mknod invocation'
okay that's the whole page, you ate that 🍓 this was GNU coreutils 9.12, dated September 2026 — mwah, go make some special files responsibly, bestie 💜✨
📦 where this page comes from
- arch rolling: coreutils 9.12-2 · GPL-3.0-or-later AND GFDL-1.3-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms