chown

Linux · Users and permissions · available in the simulator

What it does

Change file owner and group.

Syntax

chown [opciones] usuario[:grupo] archivo...

Options and parameters

  • -R

    Operate recursively on files and directories.

    chown -R ana:ana /home/ana
  • USER:GRUPO

    Change owner and group.

  • -v

    Output a diagnostic for every file processed.

  • --reference

    Use the owner and group of reference file.

Usage examples

  • sudo chown ana archivo.txt
  • sudo chown ana:devs archivo.txt
  • sudo chown -R ana carpeta/
  • chown user archivo
  • chown -R user:grupo proyecto/
  • chown -R ana:ana /home/ana

Notes and common mistakes

  • Requires administrative privileges.
Practise chown

Related commands