# sudo and Who Owns a File

Every file has an owner and a group, and only root, the computer's administrator account, may change anything; sudo runs one command as root after asking for your password, and chown gives a file a new owner, so both are used rarely and on purpose.

![Cheat sheet for the lesson sudo and Who Owns a File: Every file has an owner and a group, and only root, the computer's administrator account, may change anything; sudo runs one command as root after asking for your password, and chown gives a file a new owner, so both are used rarely and on…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/c93366ee973840b0ae7483aafa95c0e5.webp)

- Category: Bash
- Level: Journeyman
- Tags: chown, linux, root-user, sudo, unix, user-and-group
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-sudo-and-ownership-cheat-sheet
