chown

Change user and group ownership of files and directories. More information: <https://www.gnu.org/software/coreutils/chown>.

Install

All systems
curl cmd.cat/chown.sh
Debian Debian
apt-get install coreutils
Ubuntu
apt-get install coreutils
Alpine
apk add coreutils
Arch Arch Linux
pacman -S coreutils
image/svg+xml Kali Linux
apt-get install coreutils
CentOS
yum install coreutils
Fedora
dnf install coreutils
Windows (WSL2)
sudo apt-get update sudo apt-get install coreutils
OS X
brew install coreutils
Raspbian
apt-get install coreutils
Docker
docker run cmd.cat/chown chown powered by Commando

Change user and group ownership of files and directories. More information: <https://www.gnu.org/software/coreutils/chown>.

  • Change the owner user of a file/directory:
    chown user path/to/file_or_directory
  • Change the owner user and group of a file/directory:
    chown user:group path/to/file_or_directory
  • Recursively change the owner of a directory and its contents:
    chown -R user path/to/directory
  • Change the owner of a symbolic link:
    chown -h user path/to/symlink
  • Change the owner of a file/directory to match a reference file:
    chown --reference=path/to/reference_file path/to/file_or_directory

© tl;dr; authors and contributors