Skip to main content
Module 4 · Lesson 2 of 29/11 in the course~16 min
Module lessons (2/2)

Ownership and privileges (chown and sudo)

Lesson preview5 hands-on exercises readyLinux Terminal · Module 4 — Permissions and Security

Change file ownership using chown and run commands with administrative privileges using sudo.

What you'll learn in this lesson

  • Distinguish the responsibility of property (chown / chgrp) from that of permitted actions (chmod).
  • Change the owning user, group, or both in a single command using the syntax owner:group.
  • Use sudo (superuser do) specifically to execute individual protected commands without permanently working as user root.

Overview

Knowing which bits are on (rwx) is only half the equation: to determine to whom the owner and group rules apply, Linux associates each file system node with an Owner and a Group. To reassign them, privilege management comes into play.

In Linux a normal user cannot "gift" a file to another account for security (avoids bypassing disk quotas or deceiving services): elevation via sudo is needed:

Sections covered in this lesson

  1. 1Ownership and administrative privilege
  2. 2Progressive examples
  3. 3Practical exercises
  4. 4Quick check
Pro Lesson · Module 4 — Permissions and Security

Unlock "Ownership and privileges (chown and sudo)" and the full Linux Terminal curriculum

Change file ownership using chown and run commands with administrative privileges using sudo.

Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Linux Terminal plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.