Top or ‘top’ is a process viewer-and-manager for Linux. Another one is Htop or ‘htop’ that comes with more one-key shortcuts and a saner default display (colours that are more likely to be visible). However, Htop’s single-hit keybinds for e.g. killing the currently selected process easily make the user vulnerable to fatal accidents. Also, Htop is not pre-installed too often, so it’s a good idea to know some Top.
It’s not too difficult.
- Open up a terminal emulator
- Type top and hit Enter
- At this point, I normally want to change the colours. Shift+z takes to the page where to select colour schemes, a cycles between the schemes, q returns to the processes page.
- The processes are ordered whichever way, but Shift+p orders them by CPU usage.
- If the refresh interval is too fast, d lets you change it.
- Want to kill a process? Shift+l lets you filter up a process and k begins the step-by-step procedure of killing it.
- Shift+w saves the state, so that next time you open Top, it shows the same colours and lists the processes by CPU.
- A helpful list with more shortcuts and keybinds is found under h.
- q quits.