Learn how to use the top
command to get real-time information about running processes on a Linux system. This handy command provides a comprehensive view of the system’s activity.
To use the top
command, simply type top
in the terminal. This will display a dynamic real-time view of the running processes:
The information provided includes the number of processes, the number of running and sleeping processes, system load, CPU usage, and more.
By default, the processes are sorted by CPU usage, as indicated by the %CPU
column. If you want to sort the processes by memory utilization instead, you can use the following command:
top -o mem
To exit the top
command, you can simply type the letter “q” or press “ctrl-C”.
It’s important to note that the top
command is not limited to Linux systems but can also be used on macOS, WSL, and any UNIX environment.
Tags: linux, command line, top, processes, real-time