B Y T E B A R

Study Hub / CompTIA Linux+ (XK0-006) / Domain 2.0

CompTIA Linux+ (XK0-006) Domain 2.0: Services and User Management — Explained

Domain 2.0 is Linux administration's daily bread: the services that run the system, the users and groups that use it, and the permission model that keeps them separated. Conceptual first, commands second — this page teaches the why behind the commands.

Exam weight: 20% · Free study preview from ByteBar

Services: what runs the system

Users and groups: identity on Linux

Permissions: the rwx model

Read the triple left to right: who (user/group/other) × what (r/w/x). When a question gives "764," decode it: 7=rwx (owner), 6=rw- (group), 4=r-- (other).

The must-memorize table: permission numbers

Octal to meaning — decode on sight.

OctalSymbolicMeaning
7rwxRead, write, execute — full control
6rw-Read and write, no execute
5r-xRead and execute, no write
4r--Read only
3-wxWrite and execute, no read (rare)
2-w-Write only (rare)
1--xExecute only (rare)
0---No permissions at all

Try it: 4 sample questions

Sample questions to check your understanding of this domain. Answers and full reasoning are tucked under each one.

1. A shared project directory must let team members create files, but every new file should belong to the project group automatically. Which mechanism does this?

  1. A. A. Setting the setgid bit on the directory
  2. B. B. Setting the sticky bit on the directory
  3. C. C. Giving the directory 777 permissions
  4. D. D. Making every user the directory owner
Show answer & reasoning

A. setgid on a directory makes new files inherit the directory's group instead of the creator's primary group — the standard shared-folder pattern. The sticky bit (B) controls deletion (only your own files); 777 (C) is a security disaster, not a group strategy.

2. A web service is configured to run as its own dedicated user account with no login shell, instead of as root. Why?

  1. A. A. To make the service start faster
  2. B. B. Least privilege — a compromised service shouldn't hand over root
  3. C. C. To reduce memory usage
  4. D. D. Because root cannot run network services
Show answer & reasoning

B. A service running as root that gets exploited gives the attacker root. A dedicated unprivileged user contains the blast radius — the process can only touch what that user may touch. That's least privilege applied to daemons, and it's why service users exist.

3. A file has permissions 640. Which statement is true?

  1. A. A. Everyone can read the file
  2. B. B. The owner can read and write; the group can read; others have no access
  3. C. C. The group can write but not read
  4. D. D. The owner has full control including execute
Show answer & reasoning

B. Decode: 6 = rw- (owner: read+write), 4 = r-- (group: read), 0 = --- (other: nothing). It's the classic "my group can read my work, the world can't" setting — common for config files with secrets readable by a service group.

4. An administrator wants users to run only the backup script as root, without knowing the root password. Which tool and concept is this?

  1. A. A. su — switching to the root account entirely
  2. B. B. sudo — delegated, audited privilege for specific commands
  3. C. C. chmod — changing the script's permissions
  4. D. D. chown — giving users ownership of the script
Show answer & reasoning

B. sudo grants specific commands as root (configured in sudoers), logging each use — delegation without sharing the password. su (A) hands over a full root shell (all-or-nothing); chmod/chown (C, D) change file permissions, not user privilege. "Specific commands as root, no password sharing" → sudo.

This was one domain. The simulator drills all 5.

This free preview covered Services & User Management (Domain 2.0, 20%). Not covered here: Security (Domain 3.0, 18%); Troubleshooting (Domain 5.0, 22%). Linux security hardening and scenario troubleshooting stay in the paid guide and practice bank. The ByteBar Practice Exam Simulator drills every domain with 1,000 exam-style questions — $9.99 one-time unlocks all 28 exams. Prefer to read? The full Linux+ Study Guide is in the ByteBar shop on Etsy.

Practice Exam Simulator — $9.99 one-time, all 28 exams Full Study Guides on Etsy