Linux: Users, Processes & Services

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/85

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:46 AM on 7/18/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

86 Terms

1
New cards

User

An identity on the system — UID, primary group, home directory, default shell

2
New cards

Group

Allows multiple users to share permissions

3
New cards

UID/GID 0

root

4
New cards

UID/GID 1-999 (or similar, distro-dependent)

System accounts/groups, reserved for services

5
New cards

UID/GID 1000+

Regular human user accounts

6
New cards

Primary Group

The default group a user belongs to — every file they create is owned by it until changed

7
New cards

Secondary Group

Additional groups a user belongs to for shared permissions, doesn't change file ownership defaults

8
New cards

sudo

Runs a single command with elevated privileges — logged, scoped, tied to your own account

9
New cards

su

Switches to another user's full session (commonly root) until you exit

10
New cards

Why sudo over su for root access

Per-user audit trail — su as root loses track of who actually ran what

11
New cards

/etc/sudoers

Defines who can use sudo and what they're allowed to run

12
New cards

visudo

Safely edits /etc/sudoers — validates syntax before saving, prevents a broken file from locking out all sudo access

13
New cards

/etc/skel

Template directory — its contents get copied into a new user's home directory when the account is created

14
New cards

/etc/passwd

User account information (username, UID, GID, home dir, shell)

15
New cards

/etc/passwd field order

username:x:UID:GID:comment:home_dir:shell

16
New cards

/etc/shadow

Stores encrypted passwords and password aging info — only root can read it

17
New cards

/etc/group

Group information (group name, GID, member list)

18
New cards

/etc/gshadow

Stores group passwords (rarely used) and group administrators

19
New cards

wheel vs sudo group

RHEL uses "wheel" for sudo access by default

20
New cards

useradd

Create a new user (low-level

21
New cards

useradd -m

Create the user's home directory (not automatic with useradd on all distros)

22
New cards

usermod -aG

Add a user to a group WITHOUT stripping existing secondary groups (-a = append)

23
New cards

usermod -G (no -a) danger

Overwrites the user's ENTIRE secondary group list

24
New cards

userdel -r

Delete a user AND their home directory

25
New cards

passwd username

Set/change a user's password

26
New cards

chage

View/set password aging policy (expiration, warning period)

27
New cards

groupadd / groupdel

Create / delete a group

28
New cards

groups username

Show which groups a user belongs to

29
New cards

id username

Show UID, GID, and full group membership

30
New cards

getent passwd

Queries the actual user database via NSS — reflects LDAP/other sources too, not just the local file

31
New cards

who / w

Show who's currently logged in (w adds what they're doing)

32
New cards

last

Show login history

33
New cards

Process

A program currently executing — has a PID, PPID, owner, state, priority, open files, threads

34
New cards

PPID

Parent process ID — the process that spawned this one

35
New cards

Foreground process

Blocks the shell until it completes

36
New cards

Background process

Runs independently, shell stays free for new commands

37
New cards

Daemon

A background process running continuously, independent of any login session

38
New cards

Job

A task managed as a unit by the shell — lets you manage multiple tasks in one session

39
New cards

Process State R

Running or ready to run

40
New cards

Process State S

Interruptible sleep, waiting for an event

41
New cards

Process State D

Uninterruptible sleep, usually waiting on disk/IO

42
New cards

Process State T

Stopped (Ctrl+Z or SIGSTOP)

43
New cards

Process State Z (Zombie)

Completed process still in the process table because its parent hasn't read its exit status

44
New cards

Reaping a zombie

Parent calls wait()

45
New cards

Process priority / niceness

Value from -20 (highest priority) to 19 (lowest)

46
New cards

nice

Start a new process with a specified priority

47
New cards

renice

Change the priority of an already-running process

48
New cards

ps aux

a=all users, u=user-oriented detail, x=no controlling terminal (catches daemons)

49
New cards

ps -ef

UNIX-style equivalent of ps aux, interchangeable

50
New cards

top

Continuous live process stream (q=quit, P=sort CPU, M=sort memory, k=kill)

51
New cards

htop

Improved, interactive version of top

52
New cards

kill -15 (SIGTERM)

Graceful stop — asks the process to shut down cleanly

53
New cards

kill -9 (SIGKILL)

Force immediate stop — no cleanup, last resort

54
New cards

kill -19 (SIGSTOP)

Pause a process

55
New cards

kill -18 (SIGCONT)

Resume a paused process

56
New cards

kill -1 (SIGHUP)

Reload config, or terminate if the process doesn't handle it specially

57
New cards

jobs

See existing jobs and their numbers

58
New cards

fg %1

Bring a background job to the foreground

59
New cards

bg %1

Resume a stopped job in the background

60
New cards

command &

Start a process in the background, register as a job

61
New cards

nohup command &

Same as above, but detached from the session — survives a closed SSH connection

62
New cards

systemd

Default init system, PID 1, every process descends from it

63
New cards

systemctl

Primary command-line tool for interacting with systemd

64
New cards

.service unit file

Tells systemd how to start/stop/restart/supervise a daemon

65
New cards

[Unit] section

Metadata/dependencies — Description, After (ordering, not a hard requirement)

66
New cards

[Service] section

Execution behavior — ExecStart, Restart policy, User to run as

67
New cards

[Install] section

What happens on enable — e.g. WantedBy=multi-user.target

68
New cards

systemctl start/stop/restart

Control a service right now

69
New cards

systemctl status

Current state plus recent log lines

70
New cards

systemctl enable vs start

enable = starts on boot

71
New cards

systemctl reload

Re-read config without a full restart (if the service supports it)

72
New cards

Active (running) state

Service running normally

73
New cards

Inactive state

Service not running

74
New cards

Failed state

Crashed or exited with an error

75
New cards

Masked state

Completely blocked from starting, even manually — stronger than disabled

76
New cards

Static state

Cannot be enabled directly — started by another unit

77
New cards

systemctl mask / unmask

Force-block a service from starting / reverse that block

78
New cards

Systemd Target

Modern equivalent of runlevels — defines system state via the units needed to reach it

79
New cards

multi-user.target

Fully booted, multi-user, networking, no GUI — standard server target (~old runlevel 3)

80
New cards

graphical.target

multi-user.target plus a display manager/GUI (~old runlevel 5) — targets are layered, not exclusive

81
New cards

systemctl get-default / set-default

Check / set the current default boot target

82
New cards

systemctl isolate

Switch to a target live, without rebooting

83
New cards

timedatectl

Shows/sets current time, timezone, NTP sync status

84
New cards

timedatectl set-timezone

Sets the system timezone (Region/City format)

85
New cards

timedatectl list-timezones

Lists all valid timezone identifiers

86
New cards

NTP

Protocol that synchronizes a system's clock against an authoritative time source, correcting drift