Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

Linux users, permissions and processes

  • 20 min

By updated

Improve this page

Linux is a multi-user system: every file has an owner, every process runs under an identity, and permissions control who can do what. This block teaches you to create accounts, to read and change permissions, to use sudo and to watch processes. These are the foundations of system security.

Why this block exists

Without understanding users and permissions, you can neither secure a server, nor diagnose a "Permission denied", nor handle a service that refuses to start. This block is the base of any serious Linux administration.

It covers three pillars:

  • accounts: create users, manage groups, use sudo;
  • permissions: read rwxr-xr--, change rights with chmod and chown;
  • processes: understand what is running, spot a stuck process, stop it cleanly.

The guides below follow the order in which these notions build on each other: first the identity of an account, then the permissions it opens, and finally the processes, which inherit that identity.

1. Manage accounts

The users and groups guide teaches you to create an account, add it to a group and read /etc/passwd and /etc/group, the two files that describe who exists on the machine. This guide already uses sudo in front of administration commands: the dedicated guide comes in fourth position, once permissions are understood.

2. Control permissions

The guide to Linux permissions teaches you to read rwx for the owner, the group and the others, as well as the octal notation such as 750. The one to change permissions moves to action with chmod, chown and chgrp, the commands that fix most Permission denied errors and over-permissive files.

3. Run a command as root with sudo

The sudo guide shows how to run a command as root without ever logging in as root, which leaves a trace of every privileged action. It comes after permissions because understanding what root can do beyond a regular account requires knowing what a regular account is not allowed to do.

4. Watch and control processes

The guide to understand processes shows with ps, top and htop what is running and what uses which resources. The one to stop a process explains signals, from the clean stop with kill -15 to the forced stop with kill -9, and why you never start with the second one.

Key points

  • Every file has an owner, a group and permissions (read, write, execute).
  • chmod 750 gives every right to the owner, read and execute to the group, nothing to the others.
  • sudo runs a command as root: use it rather than logging in as root.
  • A process inherits the rights of the user who started it: if a service runs as root, it has every right.
  • ps aux lists every process, kill -15 PID asks for a clean stop, kill -9 PID forces it.