CHOWN(1)

<h1>πŸ’œ NAME πŸ’œ</h1>

ok so bestie, welcome to the chown page β€” that's short for change owner, and it lives in the General Commands Manual, section 1 (the "type it in your terminal" section, iykyk). So without further ado, in the official words:

chown β€” Change file owner and group ✨


<h1>πŸŽ€ SYNOPSIS πŸŽ€</h1>

the vibe check, in code form:

chown [OPTION]... [OWNER][:[GROUP]] FILE...
chown [OPTION]... --reference=RFILE FILE...

two whole moods. you either say who owns it, or you point at a file and go "be like them" 🫢


<h1>🌸 DESCRIPTION 🌸</h1>

Change file owner and group.

no literally, that's the whole thing. that's the job. it changes who owns a file and what group that file belongs to, and it is the main character of file permissions. periodt. πŸ‘‘

heads up bestie: this is one of those commands where you'll probably be typing sudo first, because handing a file to someone else is a big-girl privilege move. πŸ’…

<h1>✨ OPTIONS ✨</h1>

every single one, no skipping, we don't do that here:

  • --help β€” Print help information. your little "what do I do again?" button πŸ™ˆ
  • -c, --changes β€” like verbose but report only when a change is made. so it'll be quiet if nothing actually happened, and speak up when it did πŸ’¬
  • --from <CURRENT_OWNER:CURRENT_GROUP> β€” change the owner and/or group of each file only if its current owner and/or group match those specified here. Either may be omitted, in which case a match is not required for the omitted attribute. it's giving conditional, lowkey. "only if it's currently this person's stuff" 🧚
  • --preserve-root β€” fail to operate recursively on /. it refuses to touch the root of your entire filesystem, which is the safest glow-up πŸ›‘οΈ
  • --no-preserve-root β€” do not treat / specially (the default). this is the default, bestie, so pay attention: / is not protected unless you protect it. πŸ’€
  • --quiet β€” suppress most error messages. shhh. 🀫
  • -R, --recursive β€” operate on files and directories recursively. it goes down the whole tree, every folder, every file, no survivors 🌳
  • --reference <RFILE> β€” use RFILE's owner and group rather than specifying OWNER:GROUP values. copy the fit from another file instead of spelling it out πŸ‘―
  • -f, --silent β€” (real talk: this page lists it with no description attached, so I'm not gonna invent one for you πŸ™ˆ)
  • -v, --verbose β€” output a diagnostic for every file processed. it narrates. every. single. file. πŸ“’
  • -H β€” if a command line argument is a symbolic link to a directory, traverse it. follow it, but only when it's an argument you typed πŸ”—
  • -L β€” traverse every symbolic link to a directory encountered. follow ALL the links, no matter where they show up πŸ¦‹
  • -P β€” do not traverse any symbolic links (default). leave the links alone, this is the default energy βœ‹
  • --dereference β€” affect the referent of each symbolic link (this is the default), rather than the symbolic link itself. you're touching the thing it points at, not the link 🎯
  • -h, --no-dereference β€” affect symbolic links instead of any referenced file (useful only on systems that can change the ownership of a symlink). the link itself gets the treatment, not its friend πŸ’«
  • -V, --version β€” Print version. flex the build number πŸ’…

<h1>🌈 VERSION 🌈</h1>

v(uutils coreutils) 0.12.0

that's the one, bestie. note it πŸ’–


<h1>πŸ“ EXAMPLES πŸ“</h1>

ok here's where it gets fun, copy-paste responsibly:

Change the owner user of a file/directory:

sudo chown user path/to/file_or_directory

Change the owner user and group of a file/directory:

sudo chown user:group path/to/file_or_directory

Change the owner user and group to both have the name user:

sudo chown user: path/to/file_or_directory

Change the group of a file to a group that the current user belongs to:

chown :group path/to/file_or_directory

Recursively change the owner of a directory and its contents:

sudo chown [-R|--recursive] user path/to/directory

Change the owner of a symbolic link:

sudo chown [-h|--no-dereference] user path/to/symlink

Change the owner of a file/directory to match a reference file:

sudo chown --reference path/to/reference_file path/to/file_or_directory

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.

fr fr, that last line matters: uutils is still cooking, so if an example doesn't behave, it's not you, it's the work-in-progress situation 😭

🌸 okay that's the whole page, ty for coming to my ted talk 🌸

this was CHOWN(1) from the General Commands Manual, stamped 2026-09-25, and it's the uutils coreutils build v(uutils coreutils) 0.12.0 β€” go change some owners, bestie, you ate πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from