Lazo Lab Sign up

Linux & the Command Line / Users and permissions

Lesson 13 of 30

chown and groups

chown changes who owns a file. Groups let several users share access to the same files.

Key points

  • sudo chown user:group file
  • groups shows your groups
  • usermod -aG adds a user to a group
sudo chown -R www-data:www-data /var/www
Watch a video on thisOpens YouTube search results for “chown and groups” in a new tab

Quiz · +10 XP

Which command changes a file's owner?

Log in to save progress and earn XP.