Show Linux processes: how it works
If you want to display Linux processes, you can do this with the terminal or graphically. We show you how to proceed for both ways.
View and manage Linux processes
Everything that you can display with graphic tools also works in the terminal. There are some tools that can give you a process list on Ubuntu:
- The classic among these tools is the "ps" program. You can obtain a complete and long process list by typing "ps -e" into your terminal and confirming with the [Enter] key. The PID is important here, with which the respective process is clearly identified.
- With the command "ps -fC test program" you can find out, for example, whether an application with the name "test program" is running.
- The PID mentioned is useful when you want to end a process. This then works with the "kill PID" command.
- It works easier and without PID with the command "killall program name". The tool automatically searches for the PID of the program name and all child processes and ends it.
Show process tree under Linux
A tree view is also possible with ps, so you can see how many child processes depend on a parent process.
- This works with the command "ps -ejH", but the output is not particularly nice.
- You can get optically better results by typing "pstree" and confirming.
Graphically display the dynamic process list under Ubuntu
The previous displays are all static and do not update unless you run the command again.
- With the "top" command you get a process list that updates over time.
- The "top" program works, but it is a little nicer with the "htop" tool. You may have to install it on Ubuntu using the "sudo apt-get install htop" command.
- With "htop" you can, for example, mark a program with the mouse in the terminal and end it with [F9] directly and without further commands. The tool corresponds to a mixture of GUI and command line program.
- If you don't like the terminal, there is another way. Because even under Linux there is something like the Task Manager under Windows.