+5 votes
84 views
in Linux by (242k points)
reopened
View and manage Linux processes

1 Answer

+3 votes
by (1.6m points)
 
Best answer

Task manager with graphical user interface
Start the system monitor
The process list
End a process
Task manager in the console
start htop
How to navigate and sort
search and filter
End a process
End multiple processes at the same time

You can easily list and manage your Linux processes with a graphical task manager or with a console application..

image image

Sometimes it is worth knowing which programs are active on your Linux system. For example, you can filter out a particularly memory-consuming program or an application that is making your processor glow, and then terminate it. There are graphical solutions and command line tools to list the running processes.

Task manager with graphical user interface

If you are a fan of graphical interfaces, most Linux distributions already offer you a preinstalled task manager . Different Linux systems unfortunately also have different tools supplied with them to monitor the system status. The programs are easy to use and are reminiscent of the well-known Windows Task Manager. We will show you the process using an Ubuntu system as an example:

Start the system monitor

image
Open the start menu of your operating system. Most distributions have the start menu at the top or bottom left of the screen. There you look for the appropriate tool for your Linux system. The German version of Ubuntu is called " System Monitoring ". With other distributions, the program can also be called " Task Manager ", " System Monitor " or something similar. You may have to do a little research.

The process list

image
You will now be greeted by this or a similar window. Here you will find a list of all running processes and their resource usage . You can also see which user started the processes. Often the processes can also be sorted according to the various categories. If you, for example, on the " % CPU click", you get a sort of processes by CPU usage. In this way, particularly resource-guzzling processes can be easily identified. You can also search for specific processes by clicking on the magnifying glass .

End a process

image
You can also call up the context menu for a process with a right-click . Here you will usually be given the option to end the selected process . Please note, however, that data can be lost if a process is forced to terminate . Therefore, system applications should not necessarily be shut down. But even that is not too dangerous, because the system processes are usually simply restarted by the operating system .

Task manager in the console

The traditional tool top is installed on most Linux systems for process management in the console . The somewhat dusty tool is often replaced by the newer alternative htop . In this tutorial we will show you how to use htop .

If htop is not yet installed on your operating system, you can simply download it using the package manager. For example, on Debian systems you would use:
sudo apt install htop

start htop

image
Now just start the program with the command " htop ". A colorful, text-based Task Manager should greet you in the console window. At first glance, htop might seem a little overwhelming, but it is quite intuitive to use. At the bottom of the console window is a list of the most important key assignments . With [F1] you can, for example, call up the help menu, in which you (who would have thought it) will find even more key combinations and a legend for some of the displays. With [F2] you can open the options and configure the tool according to your preferences.

How to navigate and sort

image
You can navigate in the process list with the arrow keys or the mouse. Just like in a graphical application, you can also sort the entries here according to different categories . To do this, press [F6] and select a category in the menu on the left . Confirm with Enter . The list is then sorted according to your selection.

search and filter

image
With [F3] and [F4] you can search for or filter the processes according to their names. To do this, simply press the relevant key and enter the search or filter term . When filtering, only processes are displayed in whose names the search term appears. When searching, the first search result is displayed and you can display further results by repeatedly pressing [F3] .

End a process

image
To end a process, simply select it with the mouse or your arrow keys. Then press [F9] . A list of possible termination signals appears on the left , which you can send to the process. The standard setting " sigerm " is completely sufficient. However, if you want to test certain termination signals on your own programs, for example, these are also available to you.

End multiple processes at the same time

image
htop also gives you the option of killing multiple processes at the same time. To do this, you can mark the processes with the space bar . The marked processes are highlighted in color. If you now press [F9] , you can force all marked processes to abort.

...