MKNOD(1)

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

πŸ’– MKNOD(1) πŸ’–

okay bestie, welcome to MKNOD(1) β€” it's a User Commands page and honestly? it's giving "tiny tool, huge power" ✨ like don't let the short page fool you, this is main character energy in the filesystem world πŸ‘‘

🌈 NAME 🌈

mknod β€” make block or character special files

✨ SYNOPSIS ✨

mknod [OPTION]... NAME TYPE [MAJOR MINOR]

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, it creates the special file called NAME with the TYPE you told it to. That's the whole vibe. πŸ’…

Little note that applies everywhere, no cap: mandatory arguments to long options are mandatory for short options too. Periodt.

  • -m, --mode=MODE β€” sets the file permission bits to MODE, and NOT a=rw - umask like you'd normally get πŸŽ€
  • -Z β€” sets the SELinux security context to the default type πŸ”₯
  • --context[=CTX] β€” acts like -Z, or, if CTX is specified, sets the SELinux or SMACK security context to CTX (yes it's SMACK too, she contains multitudes) πŸ’œ
  • --help β€” displays this help and exits, our favorite kind of exit 🫢
  • --version β€” outputs version information and exits, iconic behavior ⭐

okay now the part where you actually have to pay attention, bestie πŸ‘€

Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they must be omitted when TYPE is p. No wiggle room, no negotiation πŸ™ˆ

If MAJOR or MINOR begins with 0x or 0X, it's interpreted as hexadecimal. Otherwise, if it begins with 0, as octal. Otherwise, as decimal. numbers stay numbers, the base just changes, iykyk 🌸

TYPE may be:

  • b β€” create a block (buffered) special file πŸ‘‘
  • c, u β€” create a character (unbuffered) special file πŸŽ€
  • p β€” create a FIFO πŸ“
⚠️ heads up girlypop: 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. don't come for me, it's literally in the fine print πŸ’€

🌟 AUTHOR 🌟

Written by David MacKenzie. slay, king πŸ‘‘

πŸ’Œ REPORTING BUGS πŸ’Œ

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

🧚 SEE ALSO 🧚

  • mknod(2)
  • Full documentation <https://www.gnu.org/software/coreutils/mknod> or available locally via: info '(coreutils) mknod 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 and for the cute sign-off because you know I have to πŸ’– this lil masterpiece is GNU coreutils version 9.10, dated August 2026, and it's literally MKNOD(1) β€” go make some special files bestie, you got this, mwah πŸ˜˜βœ¨πŸ¦‹

πŸ“¦ where this page comes from