chown command
Change the owner and group of files.
- Users & permissions
- Package coreutils
- 4 options · 5 examples
Syntax
chown [options] user[:group] file…Provided by the coreutils package. Run man chown for the full manual.
Common options
| Option | What it does |
|---|---|
-R | Apply recursively |
-v | Print each change |
-h | Change a symlink itself, not its target |
--reference=FILE | Copy the owner of FILE |
Examples
Change the owner
sudo chown alice report.pdfChange owner and group
sudo chown www-data:www-data /var/www/html/index.phpChange recursively
sudo chown -R www-data:www-data /var/www/htmlChange only the group
sudo chown :developers project/Copy ownership from another file
sudo chown --reference=a.txt b.txt
No example matches. Check the options table or search the guides.
chown guides
- Chown Command in Linux with Examples Linux Commands · Updated Apr 2025
