Objective. Students will create and manage Linux user accounts and groups, assign file permissions using chmod and chown, and install and remove software packages using apt.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
Linux is the backbone of servers, cloud infrastructure, and network devices you will support throughout your career. Managing who can log in, what files they can touch, and what software is installed are core day-one tasks for any IT support technician. This lesson covers three tightly connected skills: user and group management, file permission control, and package management with `apt`.
---
Before running any command as root or with `sudo`, pause and read it carefully. A mistyped `rm` or `chmod` command can delete data or open security gaps that are difficult to reverse. Always work on your assigned lab VM, never on a shared production system. When elevated privileges are required, use `sudo` for individual commands rather than logging in as root for an entire session. This limits the blast radius of any mistake.
---
Linux is a multi-user operating system. Every file, process, and resource is owned by a user and associated with a group. The operating system uses numeric identifiers called the UID (user ID) and GID (group ID) internally, though you work with human-readable names.
Creating users is done with `useradd`. The `-m` flag creates a home directory automatically:
```
sudo useradd -m technician
sudo useradd -m auditor
```
Setting passwords uses `passwd`:
```
sudo passwd technician
sudo passwd auditor
```
Creating a group uses `groupadd`:
```
sudo groupadd itstaff
```
Adding users to a group uses `usermod` with the `-aG` flags (`-a` appends; without it you would remove the user from all other groups):
```
sudo usermod -aG itstaff technician
sudo usermod -aG itstaff auditor
```
Verifying your work uses two commands. `cat /etc/passwd` lists all user accounts line by line. The `id` command shows a specific user's UID, primary GID, and all group memberships:
```
id technician
```
User account data is stored in `/etc/passwd`. Password hashes are kept separately in `/etc/shadow`, which only root can read — an important security separation.
---
Every file and directory in Linux has three permission sets: owner, group, and others (sometimes called world). Each set has three bits: read (r = 4), write (w = 2), and execute (x = 1).
Permissions are displayed by `ls -l` as a ten-character string such as `-rwxrw-r--`. The first character is the file type (`-` for file, `d` for directory). The next nine characters are three groups of three.
`chmod` changes permissions. You can use symbolic mode (`u+x`) or octal notation, which is faster for setting all three groups at once. Add the values for each set:
So `chmod 770` means owner=rwx, group=rwx, others=no access.
`chown` changes ownership. The syntax is `chown owner:group target`. To assign a directory to the `itstaff` group while keeping root as owner:
```
sudo chown root:itstaff /srv/shared
sudo chmod 770 /srv/shared
```
To test permissions, switch users with `su - technician` and attempt to create a file inside `/srv/shared`. A member of `itstaff` should succeed; a user outside the group should receive a "Permission denied" error.
Execute permission on a directory means the ability to enter it (`cd`). Without it, even read permission is useless. Always set `x` on directories you want users to access.
---
Ubuntu and other Debian-based distributions use APT (Advanced Package Tool) to install, update, and remove software from online repositories.
Update the package index first. This does not install anything; it refreshes the local list of available packages:
```
sudo apt update
```
Install packages with `apt install`. You can list multiple packages on one line:
```
sudo apt install net-tools htop nmap
```
Verify installation with `which` (shows the binary path) or `dpkg -l packagename`:
```
which htop
dpkg -l nmap
```
Remove a package cleanly with `apt remove`. Adding `--purge` also deletes configuration files:
```
sudo apt remove htop
```
Review apt history in `/var/log/apt/history.log` to confirm what was installed or removed and when. This is your audit trail and should match your lab log.
---
For every command you run, record the command and the key lines of output in your lab log. In a real workplace, this documentation proves what changed and when, which is essential during troubleshooting and security audits. Get into the habit now.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.