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
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms