18 C
Jaipur
Saturday, December 5, 2020

Killing frozen applications in Ubuntu – Linux Hint

Must read

Top Christmas gifts for PlayStation gamers: from the PS5 to cool merchandise

Struggling to think of the best Christmas gifts for PlayStation gamers? When you eventually get a wish list from your family or friends that...

mobile Internet: US House Democrats adopt mobile internet voting for leadership contests – Latest News

US lawmakers used a mobile phone app over the last two weeks to remotely cast votes for the first time, according to technologists and...

Thanks PS5 and Xbox Series X for making ray tracing cool

When the Nvidia GeForce RTX 2080 and RTX 2080 Ti made their debut way back at Gamescom 2018, the way Nvidia CEO Jensen Huang...

Spider-Man: Miles Morales has the most authentic character of 2020

Earth-616 is at peak Spidey fandom. After the successful integration of bringing Spider-Man into the ever-expanding MCU, the character was then reinvigorated in video...

Sometimes, the applications running on your system freeze and stop responding. A frozen application cannot be closed by simply using the x button in the upper-right corner of the interface, but rebooting the system is not always a good solution—especially if the system is running critical services.

In Ubuntu, there are several methods that can be used to kill frozen applications safely and quickly without rebooting your system: xkill, system monitor utilities, and the commands kill, pkill, and killall. In this article, we will discuss these methods on a machine running Ubuntu 20.04 LTS (Focal Fossa).

Xkill

Xkill is a Linux utility that allows you to kill frozen applications running on Ubuntu. It comes preinstalled in most Linux distributions, but if it is not installed on your system, you can install it as described below.

First, open the terminal using Ctrl+Alt+Del and enter the following command:

$ sudo apt install xorg-xkill

Then, provide a sudo password, and when asked for confirmation, press y, after which the system will start the installation of Xkill. After the installation is finished, xkill can be used to kill unresponsive applications.

To kill a frozen app, simply type xkill in the Terminal:

By doing so, your cursor will become an x. Simply place the x on the application you want to close and click it to close the application immediately.


You can create a keyboard shortcut for xkill by right-clicking your Ubuntu desktop and opening the Settings application.


In the Settings window, select Keyboard Shortcuts from the left pane.


Then in the right pane, click the + button, as shown in the screenshot below.


When the following dialog box appears, specify a user-friendly name for the shortcut in the Name field. Then, in the Command field, type xkill. Next, click the Set Shortcut button to select a shortcut for the xkill utility.


Use any combination of keys to set a shortcut for the xkill utility. For instance, to use Ctrl+k to launch xkill, press and hold and then press the k key. Then, release both keys.


Click the Add button to add your shortcut.


Now, whenever you need to need to kill a frozen application, you can press the shortcut keys to execute the xkill command.

Using the System Monitor

From Ubuntu System Monitor, you can also kill an application. To open System Monitor, press the super key on your keyboard and enter system monitor. When the icon for the System Monitor appears, click it to open it.


In the System Monitor application, there will be a list of processes that are currently running on the system. Select the process you want to kill and right-click it. From the menu that appears, select Kill to kill the selected process immediately.

Using kill, pkill, and killall

Kill, pkill, and killall can be called in the command line to kill an application based on its process name or process ID (PID).

To find the PID, issue the following command in the terminal:

$ ps aux | grep <process-name>

For example, in the following output, 34636 is the PID of the Rhythmbox application.

$ ps aux | grep rhythmbox


To kill a process by using its PID, use the kill command as follows:

Here, 34636 is the PID of Rhythmbox obtained above.

Alternatively, to kill a process by using its process name, you can use the pkill and killall commands. To use pkill to kill a process, type pkill followed by the process name as follows:


To use killall to kill a process, type killall followed by the process name as follows:

Conclusion

As you can see, there are multiple ways to kill a frozen application in Ubuntu. By using any of the above methods, you can easily kill an application that is neither responding nor terminating. Similarly, you can kill an application that is locked by another process.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Top Christmas gifts for PlayStation gamers: from the PS5 to cool merchandise

Struggling to think of the best Christmas gifts for PlayStation gamers? When you eventually get a wish list from your family or friends that...

mobile Internet: US House Democrats adopt mobile internet voting for leadership contests – Latest News

US lawmakers used a mobile phone app over the last two weeks to remotely cast votes for the first time, according to technologists and...

Thanks PS5 and Xbox Series X for making ray tracing cool

When the Nvidia GeForce RTX 2080 and RTX 2080 Ti made their debut way back at Gamescom 2018, the way Nvidia CEO Jensen Huang...

Spider-Man: Miles Morales has the most authentic character of 2020

Earth-616 is at peak Spidey fandom. After the successful integration of bringing Spider-Man into the ever-expanding MCU, the character was then reinvigorated in video...

Apple is replacing unresponsive iPhone 11 screens for free

If your iPhone 11 screen has mysteriously stopped responding to your touches to some degree then Apple will replace the display free of charge,...