Programs and processes
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
What is a process?
- A process is a running program. Your browser, your editor, and the shell itself are all processes.
- Each has a number — a PID (process ID) — that the system uses to keep track of it.
- (These commands talk to the real operating system, so they aren't part of our simulator — but here is what you'll use on a real machine.)
Seeing what is running
pslists your processes;ps auxlists all of them.top(or the nicerhtop) shows a live view that updates every second — handy to spot a program using too much CPU or memory:
top
- Press
qto quittop.
Stopping a process
- If a program is frozen, you can stop it. In the terminal, Ctrl-C stops the program running right now.
- For another process, find its PID with
psand thenkillit:
kill 1234
killpolitely asks the process to stop;kill -9forces it. Use force only as a last resort.