How to Use the Linux Terminal to Identify and Kill a Known Process in Linux

Published on Aug. 22, 2023, 12:12 p.m.

Process management is a key Linux skill to learn and it’s worth taking the time to practice these approaches.

In this how-to we’ll look at various ways of using the terminal emulator to identify processes .A process can be an application or script running on Linux.Sometimes a process can crash or become a memory hog and this is when we need to step in.

How to Kill a Known Application in Linux oppress.

To begin, let’s open a software application.

Using the killall command, all processes connected to the named application are killed.

killall inkscape

Identifying Different Processes in Linux

Many software applications have many processes running. It can be useful to try and work out which one is likely causing the problem.

1.Launch the top tool.The second line of the top screen shows the total number of tasks, which are currently running or zombie status.

top

2.Press i to constrain the current processes list .

3.Press z to add color to the top interface.

4.Startup Inkscape or another non essential application.

5.Note the PID.The PID is listed in the first column of the top output.

6.Press k then type the Pid number to kill the process.

7.Press ENTER and you should see a message which is confirming you want to kill this process.Press “enter” once more to confirm and kill .

Killing an Individual Process Outside of top

Occasionally you might want to kill a process outside of top .In combination with the kill command, we can use the number found via top to do this.Note that the killall command we used earlier won’t work with an individual process.

1.Launch Inkscape or another application outside .

2.Launch top in the terminal where .

top

3.Identification and note the PID for the application to kill .

4.Exit top by pressing Q.

5.Use the kill command and the PID number to kill.

kill 4582

Killing Processes Using the ps Process Report

There is an alternative.

1.Launch Inkscape or another application outside .

2.Run the ps command.The -e argument shows all the processes and the -f argument sets the format .

ps -ef

3.Use grep to filter the report.

ps -ef | grep inkscape

4.Use the kill command along with the PID oppress.

kill 19166