How to Use xkill to terminate processes on the Linux desktop?

Source: Internet
Author: User

How to Use xkill to terminate processes on the Linux desktop?

Linux is famous for its stability, robustness, and outstanding error-free functions. However, no matter how advanced and error-free an operating system is, at some point, system pauses and windows are frozen/suspended. Fortunately, this is not a big problem at all, because Linux users can take full advantage of the clever tools and commands that allow users to immediately end the messy "unresponsive" applications!

Today's Linux distributions can usually detect any problematic window and provide users with this option: forcibly stop waiting for the final response of the application, but if you do not see any prompts for such conversations, you can always use the reliable old-fashioned "xkill" command to overcome any problems. The only prerequisite for using this command is that the rest of the system is not completely frozen, and the rest of the system is rarely completely frozen.

How to Use the xkill command to kill Linux processes/unresponsive programs

How to use "xkill "?

The "xkill" command is part of the "xorg-xkill" package. To use it, make sure that the latter has been installed on your system. To this end, install it through the software center/Package Manager of the Linux release version, or use a terminal to install it.

For Ubuntu/Mint users

1. sudo apt-get install xorg-xkill

For Fedora users

1. sudo yum install xorg-xkill

For Arch users

1. sudo pacman-S xorg-xkill

Now that we have installed the "xorg-xkill" package, you can open the terminal by entering "xkill" and press the Enter key. This will change your mouse cursor to "x" or a skeleton pattern (depending on your icon set ). Now you just need to move the mouse left to any window without a response, and it will disappear immediately.

Add shortcuts

But why do you need to open a terminal whenever you want to end a window? It is really not very convenient, so here we will teach you a trick. You can customize the keyboard shortcut so that you can call "xkill" in any situation ". To do this, you only need to go to "System Settings", select the "Keyboard" section, and then go to "Custom Shortcuts (Custom Shortcuts) "category to add the shortcut you need.

Click the shortcut you just added. You can enter the preferred key order. I recommend that you use "Ctrl + Alt + k" because it is usually not occupied by any other operation and its function is briefly specified. Now, every time you press the button in this order, the mouse cursor will be converted to the "x" of the final process. You only need to click the messy window to eliminate it.

Possible Impact

It is easy and convenient to use "xkill", but it lacks some possible disadvantages. The problem is that some applications that lose the X relationship will continue to run as processes in the background. The system resources are shelved, and users cannot see any active processes on the screen. Once the X relationship is lost, most applications will terminate the process, but some applications will not end the process. So we will teach you how to solve this problem if this happens.

Open the terminal, write "top", and press Enter. This displays the currently running process. To sort processes by CPU usage, you can press the "P" button on the screen. Find the process that is still running and pay attention to the PID in the left column. Now press the "k" button and you will be prompted to enter the PID Number of the process you want to terminate. After completing this step, you can enter "kill" and press the Enter key. This process will disappear forever. Note: user permissions apply to both "kill" and "xkill", so make sure that the process you want to terminate is not run by the system administrator. If the process is run by the system administrator, run the "su" command to enable the terminal session, or enter "sudo top ".

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.