Back to course

32. Understanding Users and Groups

Linux Basics: From Zero to CLI Hero

The Foundation of Linux Security

Linux is built around the concept of multi-user access. Security and resource control rely heavily on how users and groups are defined.

Users

Every process and file is associated with a specific user ID (UID). There are three primary types of users:

  1. Root (The Superuser): UID 0. Has full administrative control over the entire system. Can read, write, and execute anything.
  2. System Users: UIDs 1-999 (varies by distribution). Used by services and applications (e.g., apache, mysql). They cannot typically log in interactively.
  3. Regular Users: UIDs 1000+. These are the human accounts you create for daily use.

Groups

Groups allow multiple users to share access permissions for files and resources. Every user belongs to at least one primary group (often named the same as their username) and can be a member of multiple secondary groups.

Example: To allow three system administrators to access the same directory, you add them all to the sysadmin group and assign the directory ownership to that group.