Permissions and owners

The chown command

Changes the owner of a file. It needs administrator privileges.

Syntax

sudo chown usuario[:grupo] <archivo>

Most useful options

-RAlso changes everything inside a folder

Copy-ready examples

$ touch notas.txt && sudo chown alumno notas.txtPut it in your name
$ sudo chown -R alumno:alumno ProyectosA whole folder

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Without sudo, a normal user cannot change the owner.

Related commands

FAQ

How do chown and chmod differ?

chown changes who owns it; chmod changes what each one can do.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course