CHMOD(1)

πŸ“¦ version 0.12.0, in arch rolling

hey bestie!! welcome to the chmod glow-up manual, straight from the General Commands Manual πŸ’…βœ¨ this page is gonna make you obsessed with file permissions, fr fr.

✨ NAME ✨

chmod β€” change the mode of each FILE to MODE. and with --reference, change the mode of each FILE to that of RFILE instead. it's giving permission makeover πŸ’…

🌈 SYNOPSIS 🌈

chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE...
chmod [OPTION]... --reference=RFILE FILE...

πŸ’– DESCRIPTION πŸ’–

okay so basically, chmod is your go-to for changing the mode of each FILE to MODE. and if you're using --reference, it changes the mode of each FILE to that of RFILE instead. that's the whole vibe. periodt. πŸ’…

🌸 OPTIONS 🌸

  • --help β€” print help information. like, it's the "help me help you" flag 🫢
  • -c, --changes β€” like verbose but report only when a change is made. so it's the "only spill tea when something actually changes" vibe πŸ’…
  • -f, --quiet β€” suppress most error messages. shhh, we don't need the negativity πŸ™ˆ
  • -v, --verbose β€” output a diagnostic for every file processed. it's giving "tell me everything" energy 😭
  • --no-preserve-root β€” do not treat '/' specially (the default). so '/' is just a regular file path, no special treatment. this is the default, bestie. ⚠️ but like, be careful with this one.
  • --preserve-root β€” fail to operate recursively on '/'. so if you try to go recursive on '/', it's gonna fail. it's giving protective energy πŸ›‘οΈ
  • -R, --recursive β€” change files and directories recursively. it goes deep, like, all the way down the directory tree 🌳
  • --reference β€” use RFILE's mode instead of MODE values. so you're copying the vibe of another file's permissions πŸ’…
  • -H β€” if a command line argument is a symbolic link to a directory, traverse it. so it follows the symlink if it's a dir, but only for command line arguments. iykyk πŸ”—
  • -L β€” traverse every symbolic link to a directory encountered. it follows every symlink to a dir it sees. like, no symlink left behind πŸšΆβ€β™€οΈ
  • -P β€” do not traverse any symbolic links (default). this is the default, bestie. no symlink traversal at all. periodt. πŸ›‘
  • --dereference β€” affect the referent of each symbolic link (this is the default), rather than the symbolic link itself. so it changes the thing the symlink points to, not the symlink. and this is the default, so it's the usual vibe. πŸ”—
  • -h, --no-dereference β€” affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink). so it changes the symlink itself, not what it points to. but like, only useful on systems that can change the ownership of a symlink. iykyk πŸŽ€
  • -V, --version β€” print version. it's the "what version am I on" flag ✌️
  • [MODE] β€” the mode you're setting. it's the what. like, the permission vibe you want. πŸŽ€
  • [FILE] β€” the file or files you're setting it on. it's the who. like, the target of your permission makeover. 🫢

🌟 EXTRA 🌟

each MODE is of the form:

[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=]?[0-7]+

that's the whole formula, no cap. if you know, you know. iykyk πŸ’€

πŸ’œ VERSION πŸ’œ

this page is brought to you by uutils coreutils 0.12.0, last updated on 2026-09-17. stay slay, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from