System and processes
The top command
Shows a snapshot of every process sorted by usage, with the load and memory summary on top.
Syntax
topMost useful options
-u usuarioOnly that user's processes-n NNumber of refreshesqOn a real Linux, q quits topCopy-ready examples
$ topProcess snapshot$ top -u rootOnly root'sYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- Here it is a simulated, fixed view; on a real Linux it refreshes itself and you quit with q.
- A CPU at 100% is not bad by itself: check whether there are processes in state R (running).
FAQ
How do I sort by memory?
In real top, with M; P sorts by CPU.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course