How to use the kill process in Ubuntu

We will discuss process control and different methods to stop, end or kill a processing activity or running program on Ubuntu Linux.

Updated: 17 Dec, 23 by Susith Nonis 7 Min

List of content you will read in this article:

Understanding how to effectively manage processes is fundamental for any Ubuntu Linus user, especially when troubleshooting or optimizing system performance. Among the array of commands available, 'kill' stands out as a powerful tool, enabling users to terminate specific processes efficiently. In this guide, we'll delve into the intricacies of using the kill command in Ubuntu, exploring its various options and demonstrating its application in stopping processes gracefully or forcefully, granting you greater control over your system's functionalities.

Before we continue, Dive into essential Linux command line tools to enhance your productivity.

Stopping a process means sending the “SIGSTOP” command to the identified process by the system. This way, the system will pause the running program without terminating it and allow you to resume the process whenever you want.

Ending a process means the system will try to gracefully end the program without completely killing off the process. Here, the system sends the “SIGTERM” command to the chosen process and helps it be safely shot down.

Killing is a more drastic process only used when the program you want to stop is not responding to the “END” command. This way, the system will send the “SIGKILL” signal to the identified process and terminate it by force immediately. 

Remember, the killing process will not have a chance to stop safely. Therefore, it should always be the last resort. Master the Kill Command in Linux with our comprehensive guide.

If you kill the wrong process, everything can be messed up in your system. So, always make sure that you are selecting the proper process and that you are sure that there is no other measure to take besides killing it. 

You can use two methods to stop, end, or kill the process on a Linux-based OS. The methods are as follows: 

Kill a process on Ubuntu using the graphical interface 

To kill a process on Ubuntu using the graphical interface, you should use the “System Monitor” software by following these steps:

  • Click on the bottom left “Show Application” or the top left “Activities” button on the screen.
  • Wait while the Activities screen opens.
  • Type the “System Monitor” Using the search box automatically pop up on the screen. You can also click on the magnifying glass over the top right-hand side of the system monitor to get the search box. 
  • Click on the “System Monitor” icon once it appears. 
  • Identify the process you want to stop, end, or kill.
  • Right-click on the identified process.
  • You can find several options by right-clicking on the identified item, such as stop, continue, end, and kill.
  • You should click the “Stop” option or press CTRL + S to stop the process. 
  • To end the process, click on the “End” option or press CTRL + E. 
  • To kill the process, click on the “Kill” option, or press CTRL + K.
  • Using the system monitor, you can check out the currently running processes.
  • The system monitor will send you a message in a pop-up box before it runs the “Kill” command. 
  • If you are sure about proceeding with the killing process, you need to click the “Kill Process” button. Otherwise, you may choose “Cancel” and stop the killing process.

Kill a process on Ubuntu using the terminal method

If you are using an Ubuntu server or an SSH or Secure Shell network communication protocol, you would not have access to a graphical interface. Enhance your skills: Connect to SSH Terminal like a pro!

In this situation, you might force stop or kill a process using the terminal and its three commands instead. 

You should first press CTRL + ALT + T to open the terminal. Then, you can use one of the following commands:

“kill” command 

Using the “Kill” command helps you to kill single process IDs. Therefore, you need to find the process ID, type it along with the command, and press Enter. 

You should always double-check the PID. Otherwise, you may inadvertently kill some other process, which might cause problems in the system. 

“killall” command

The “Killall” command helps you kill all processes with an exact name.

“pkill” command

Using the “pkill” command helps you to kill a specific process that you know its name exactly.

To check the running process ID on Ubuntu, you can follow the below steps:

  1. Open the terminal by pressing Ctrl + Alt + T
  2. Use the SSH command for remote servers
  3. Type the “ps aux” command
  4. Identify the specific PID or process ID you need
  5. Copy the PID
  6. Press Ctrl + C to exit and go ahead to kill the process 

When you open the System Monitor, You can find four Windows tabs containing much useful information. These tabs are as follows:

  • System

In this tab, you can find general information about the current workstation.

  • Process

By choosing the process tab, you can see real-time information about the programs that currently are running on your system, such as status, virtual memory being used, shared memory, CPU time, as well as how the process is being executed. There are a few things available to you in this section, and you can adjust them based on your preferences. Access our comprehensive Linux process list resource for efficient system administration.

  • Resources

In the resources tab, you can see the list of resources currently being used by the system in real time. 

Also, there is information about what user is currently running the process, how much CPU or memory usage you have been used up by a process, as well as the current priority of the process. 

The columns here are not everything available to you. You can add more columns by clicking one of the three bars on the top right-hand side of your monitor and going down to the “Preferences” option. 

  • File Systems

Finally, in the file systems tab, you can see the storage used by the various file systems and information about the system's hard drives.

This article discussed both methods that help you kill a process on Ubuntu. Also, we explained the way you can find the considered PID and many more. We hope you learned all the required measures to stop a running program on your system. Let us know if you have any questions or suggestions in the comment section below! Good luck!  

Susith Nonis

Susith Nonis

I'm fascinated by the IT world and how the 1's and 0's work. While I venture into the world of Technology, I try to share what I know in the simplest way with you. Not a fan of coffee, a travel addict, and a self-accredited 'master chef'.