CHMOD(1)

πŸ’– chmod(1) β€” the "bestie, let me fix ur permissions" manual πŸ’–

okay so you opened the General Commands Manual and the command is chmod β€” short for change mode, which is exactly what it does, no cap. Manifesting the whole page for you, section by section, not a single detail skipped. 🫢


✨ NAME ✨

chmod β€” change the mode of each FILE to MODE. And with --reference, change the mode of each FILE to that of RFILE. it's giving "permissions glow-up". πŸ’…


🌸 SYNOPSIS 🌸

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

three whole ways to spell the same energy. pick ur fighter. ⭐


πŸ¦‹ DESCRIPTION πŸ¦‹

Change the mode of each FILE to MODE. With --reference, change the mode of each FILE to that of RFILE.

that's literally it, that's the whole vibe. ur files get the permissions you say. periodt. πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

  • --help β€” print help information. the "bestie explain" button. πŸ†˜
  • -c, --changes β€” like verbose, but it only reports when a change is actually made. so if nothing happened, it stays quiet. selective storytelling, we love that. πŸ™Š
  • -f, --quiet β€” suppress most error messages. shhh. not everything needs to be a conversation. 🀫
  • -v, --verbose β€” output a diagnostic for every file processed. yapper mode: ON. πŸ—£οΈ
  • --no-preserve-root β€” do not treat / specially. and btw this is the default, so it's just saying the quiet part out loud. 😳
  • --preserve-root β€” fail to operate recursively on /. this is the seatbelt. respect the seatbelt. 🚨
  • -R, --recursive β€” change files and directories recursively. it goes deep. πŸŒ€
  • --reference β€” use RFILE's mode instead of MODE values. copy the fit off someone else. πŸ‘―
  • -H β€” if a command line argument is a symbolic link to a directory, traverse it. only the ones you named, tho. 🫡
  • -L β€” traverse every symbolic link to a directory encountered. all of them. no exceptions. πŸšͺ
  • -P β€” do not traverse any symbolic links. this one is the default. 🧊
  • --dereference β€” affect the referent of each symbolic link (this is the default), rather than the symbolic link itself. i.e. touch the thing it points at, not the pointer. πŸ‘‰
  • -h, --no-dereference β€” affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink). niche but iconic. πŸ’€
  • -V, --version β€” print version. ✨

also, hanging out at the bottom of this list as their own little entries:

  • [MODE]
  • [FILE]

πŸ”₯ EXTRA πŸ”₯

each MODE is of the form:

read it slowly, it's a regex, it's doing its best. 🌈


🧚 VERSION 🧚

v(uutils coreutils) 0.12.0


πŸ“ EXAMPLES πŸ“

bestie these are the good ones. grab a snack. 🍿

Give the [u]ser who owns a file the right to e[x]ecute it:

Give the [u]ser rights to [r]ead and [w]rite to a file/directory:

Remove e[x]ecutable rights from the [g]roup:

Give [a]ll users rights to [r]ead and e[x]ecute:

Give [o]thers (not in the file owner's group) the same rights as the [g]roup:

Remove all rights from [o]thers:

Change permissions recursively giving [g]roup and [o]thers the ability to [w]rite:

Recursively give [a]ll users [r]ead permissions to files. Also give e[X]ecute permissions to files that have at least one execution permission and to all sub-directories:

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.

(not me being honest about the work-in-progress thing 😭 but fr fr, heads up.)


and that's the whole page, bestie, every flag preserved, nothing skipped, vibe fully intact. πŸ’– this edition was served up by the fine folks of uutils coreutils, version 0.12.0, and it's dated 2026-09-25 β€” slay, see you in the next man page. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from