Ubuntu

Forcefully Close a Program on Ubuntu

While working on the Ubuntu system, you may experience that suddenly a program stops responding. The reason for the program to stop suddenly is due to work overload or an internal error that causes the program to stop. This creates an erroneous situation for most system users because if this happens on a vital program you are working on, you have to fix this issue as soon as possible.

This article is a detailed guide to forcefully closing a program on Ubuntu so that you can run it again and do your activity on a program.

Forcefully Close a Program on Ubuntu

There are several methods to close a program on the Ubuntu system and it can be done via:

Method 1: Close a Program Using GUI

To close a program using GUI, Ubuntu users forcefully can use the built-in System Monitor tool, which is similar to the Task Manager on Windows system. It shows you the list of running programs on your Ubuntu system. If any program is stopped suddenly and fails to close using the normal method, you can close it through this tool using the following steps:

Step 1: Open the System Monitor tool on the Ubuntu system from the Application Menu.

This launches the System Monitor tool on the desktop.

At the panel, you will see the process information running on the Ubuntu system.

Step 2: To kill a process or program, right-click on the process and select the “Kill” option.

Step 3: Then choose the “Kill Process” to forcefully closes the process or program on the Ubuntu system.

Method 2: Close a Program Using Terminal

You can also use the command-line terminal to forcefully close a program on the Ubuntu system using the xkill command. The xkill is a command-line utility already installed on the Ubuntu system that allows users to forcefully kill a process or program running on their desktop.

For the process to work, you just need to run the “xkill” command in the terminal:

xkill

 

Then select the application running on the system, which you want to close.

You can also utilize the kill command to forcefully close a program or process on the Ubuntu system. However, for that command, you have to kill with the process or program ID.

You can find the program or process PID from the command “top”.

top

 

Then to kill the process using the kill command, follow the syntax below:

sudo kill <PID>

 

On the other hand, you can use the pkill command to forcefully close a program on Ubuntu. The pkill command doesn’t requires process ID instead it uses the program name to kill it.

pkill firefox

 

Finally, you can also use killall command to forcefully close a program on the Ubuntu system.

killall firefox

 

Conclusion

You can forcefully close a program on the Ubuntu system from GUI using the System Monitor tool. You can also use the command line to close a program on the system. The xkill command is simple that closes the program if you click on the program. While other commands such as kill will close the program with PID. You can also use pkill and killall commands to forcefully close a program on the Ubuntu system.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.