Hello everyone. Once I used to be a Windows user but now I use Linux and I use Ubuntu distribution. When I switched to Linux, one of the initial tasks was to know the processes running in the background. In Windows, we have task manager which is GUI. In Linux we have so many task managers that are GUI & CLI both. In this article, I’ll mention one of the easiest CLI Linux system monitoring tool known as ‘Top’.
'Top' Linux System Monitoring Tool
Top is a Linux system monitoring tool that can be used to see the processes running in the background of the operating system. Just like I had a task manager in Windows operating systems. The difference between Top and Task manager is that Task manager had a Graphical user interface and Top has a command-line interface.
It's Simple To Use!
To run ‘Top’, you can open terminal and then type “top” without quotation marks and press return. It will show you all the processes running in the background. You will notice that the table in the terminal you have is being updated every three seconds and you can change that interval time by pressing save “s” without quotation marks and it will let you enter the number. This number is actually a time interval in seconds that you can enter and it will change the interval.
For Example – If you type 1 and hit return it will update the process table every second.
How To Kill A Process Using Top?
You will see a long list of processes those are running in the back ground. You can press “i” without quotation marks and it will hide all the processes those are not using your CPU. Now you have only CPU hungry processes in front of you. In case you like to kill any process you need to look at the PID number. This number is a process ID which you can use to kill it. You can see the process in the very last column in the table and then make a note of PID.
Once you know the PID, you can press “k” without quotation marks and then type PID and hit return twice. You will see that process will be killed.