Skip to content

Linux commands: top

New Course Coming Soon:

Get Really Good at Git

A quick guide to the `top` command, used to list the processes running in real time

A quick guide to the top command, used to list the processes running in real time

The top command is used to display dynamic real-time information about running processes in the system.

It’s really handy to understand what is going on.

Its usage is simple, you just type top, and the terminal will be fully immersed in this new view:

The process is long-running. To quit, you can type the q letter or ctrl-C.

There’s a lot of information being given to us: the number of processes, how many are running or sleeping, the system load, the CPU usage, and a lot more.

Below, the list of processes taking the most memory and CPU is constantly updated.

By default, as you can see from the %CPU column highlighted, they are sorted by the CPU used.

You can add a flag to sort processes by memory utilized:

top -o mem

This command works on Linux, macOS, WSL, and anywhere you have a UNIX environment

Are you intimidated by Git? Can’t figure out merge vs rebase? Are you afraid of screwing up something any time you have to do something in Git? Do you rely on ChatGPT or random people’s answer on StackOverflow to fix your problems? Your coworkers are tired of explaining Git to you all the time? Git is something we all need to use, but few of us really master it. I created this course to improve your Git (and GitHub) knowledge at a radical level. A course that helps you feel less frustrated with Git. Launching May 21, 2024. Join the waiting list!

Here is how can I help you: