Skip to content
ohsudo, Home

Module 4: The system

Processes: ps and kill

Everything running on a system is a process with a number, its PID. Here you'll find one that shouldn't be running, and stop it the polite way.

● Runs 100% in your browser. Nothing here can harm a real system.

Step 1 of 6

What's running?

ps aux lists every process on the system: who runs it, its PID, how much CPU and memory it uses, and its command.

Your task

List every running process.

guest@ohsudo: ~ — Ubuntu 24.04

Starting the terminal…

What you'll practice

  1. What's running?. ps aux lists every process on the system: who runs it, its PID, how much CPU and memory it uses, and its command.
  2. Find one. On a real server that list is long, so pipe it into grep.
  3. Stop it. kill sends a signal to a PID. By default, that signal asks the process to clean up and exit. kill -9 forces it, which is for when that fails, as the process gets no chance to save anything.
  4. Check it's gone. Always check. A process that keeps coming back is usually being restarted by something else.
  5. Not yours. You can only signal your own processes. For anyone else's, you need sudo. PID 911 is Nginx, which runs as root.
  6. Services are different. Don't kill a service, as systemd may just start it again. For anything systemd runs, use systemctl. The next lesson covers that.

See also