# man > xkill(1)

> **TLDR:** Kill a window interactively in a graphical session.
>
- Display a cursor to kill a window when pressing the left mouse button (press any other mouse button to cancel):
  `xkill`
- Display a cursor to select a window to kill by pressing any mouse button:
  `xkill -button any`
- Kill a window with a specific ID (use `xwininfo` to get info about windows):
  `xkill -id {{id}}`

*Source: tldr-pages*

---

[_XKILL_(1)](https://www.chedong.com/phpMan.php/man/XKILL/1/markdown)                               General Commands Manual                              [_XKILL_(1)](https://www.chedong.com/phpMan.php/man/XKILL/1/markdown)

## NAME
       xkill - kill a client by its X resource

## SYNOPSIS
       **xkill **[-display _displayname_] [-id _resource_] [-button number] [-frame] [-all] [-version]

## DESCRIPTION
       _Xkill_ is a utility for forcing the X server to close connections to clients.  This program is
       very  dangerous, but is useful for aborting programs that have displayed undesired windows on
       a user's screen.  If no resource identifier is given with _-id_, _xkill_ will display  a  special
       cursor  as  a  prompt  for  the user to select a window to be killed.  If a pointer button is
       pressed over a non-root window, the server will close its connection to the client that  cre‐
       ated the window.

## OPTIONS
### -display _
               This option specifies the name of the X server to contact.

### -id _
               This  option  specifies  the  X  identifier  for  the resource whose creator is to be
               aborted.  If no resource is specified, _xkill_ will display a special cursor with which
               you should select a window to be kill.

### -button _
               This option specifies the number of pointer button that should be used in selecting a
               window to kill.  If the word "any" is specified, any button on  the  pointer  may  be
               used.  By default, the first button in the pointer map (which is usually the leftmost
               button) is used.

### -all    
               killed.   _Xkill_ will ask you to select the root window with each of the currently de‐
               fined buttons to give you several chances to abort.  Use of  this  option  is  highly
               discouraged.

### -frame  
               top-level client windows (which are typically nested inside a window manager window),
               and simply believe that you want to kill direct children of the root.

### -version
               This option makes xkill print its version and exit without killing anything.

## CAVEATS
       This command does not provide any warranty that the application whose  connection  to  the  X
       server  is  closed will abort nicely, or even abort at all. All this command does is to close
       the connection to the X server. Many existing applications do indeed abort when their connec‐
       tion to the X server is closed, but some can choose to continue.

## XDEFAULTS
       **Button  **Specifies a specific pointer button number or the word "any" to  use  when  selecting
               windows.

## SEE ALSO
       [X(7)](https://www.chedong.com/phpMan.php/man/X/7/markdown), [xwininfo(1)](https://www.chedong.com/phpMan.php/man/xwininfo/1/markdown), [XKillClient(3)](https://www.chedong.com/phpMan.php/man/XKillClient/3/markdown), [XGetPointerMapping(3)](https://www.chedong.com/phpMan.php/man/XGetPointerMapping/3/markdown), KillClient in the X Protocol Speci‐
       fication

## AUTHOR
       Jim Fulton, MIT X Consortium
       Dana Chee, Bellcore

X Version 11                                 xkill 1.0.6                                    [_XKILL_(1)](https://www.chedong.com/phpMan.php/man/XKILL/1/markdown)
