READDEMOGUIDED LABINDEPENDENT LABQUIZREVIEW
Module 5 of 7 · 25 min Processes and services
Beginner · 2/5Written by CoreQ Academy (drafted with AI assistance). Awaiting review by Sean Ofodile.
You will be able to- List and rank processes
- Stop a process safely
- Check, start and stop services with systemctl and journalctl
Every program is a process
Each running program has a process ID (PID) and an owner. ps aux lists all processes with CPU and memory use; top ranks the busiest.
Stopping processes
kill PID asks a process to stop. You can only signal your own processes unless you are root. Check what a PID is before you kill it.
Services
Long-running daemons are managed by systemd. systemctl status shows state and recent logs; journalctl -u NAME shows the service's log history.
$ systemctl status nginx
$ sudo systemctl restart nginx
$ journalctl -u nginx -n 20Demo: try these in the terminal
ps aux | see all processes and owners |
top | rank by CPU |
systemctl list-units | see all services |
journalctl -u webapp | read a failing service's logs |
Quiz
Knowledge quiz · pass mark 80%
- Which command shows the last 20 log lines for the webapp service?
- Show the status of the nginx service.$
- What identifies a specific running process?
- What is the difference between enable and start?
- A service fails with "cannot read config: Permission denied". Best first step?
- List every process with user, CPU and memory columns.$
- A regular user can kill processes owned by other users.
- Order the steps for handling a CPU hog.
- check the owner and command line
- confirm it is gone and services are healthy
- kill PID
- top or ps aux to find it