CHMOD(1)
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β useRFILE's mode instead ofMODEvalues. 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
- arch rolling: uutils-coreutils 0.12.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms