Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes it happens that a Wine application crashes (slowing down the system and making it almost unusable). In most cases I'm able to kill the program with xkill, but sometime I've to restart as Ubuntu seems not to respond very well (the only thing that works is ALT+F2, the launcher; xkill doesn't). I've tried to use wineboot -r or -f but they don't seem to work very well.. If something is unclear, let me know I'll try to explain better :)

share|improve this question
up vote 6 down vote accepted
killall nameofexefile.exe

just like linux processes

share|improve this answer
is this just for wine or for all running process in linux? – 13east Jul 9 '11 at 1:22
this will kill any process, windows via wine, or linux – Conor Rynne Jul 9 '11 at 6:41
So wineserver -k will kill all wine processes... it's what I meant... I don't use killall <file>.exe as often I don't know the exact name of the file (and when the system goes crazy I won't know in any case) – Hadden Jul 10 '11 at 0:49
ahhh right then in that case wineserver -k will probably do the job. Just be careful you don't have any other wine processes open, that includes programs in PlayOnLinux and Crossover too. – Conor Rynne Jul 10 '11 at 10:41
@Hadden - why have you accepted an answer that you say you wont use? – fossfreedom Jul 10 '11 at 21:17

You can safely kill wine sessions either via ALT+F2 or via a terminal by typing

wineserver -k

If it is really doesnt want to shutdown then you can force it via

wineserver -k9
share|improve this answer

I was just about to have the same problem. This command in terminal helped me. Press Ctrl + Alt + t and then write the following:
ps -x | grep "Your program name" | awk '{print $1}' | xargs kill

Your program name should be written without quotes, It helped me solving oblivion.exe:
ps -x | grep Oblivion | awk '{print $1}' | xargs kill

share|improve this answer

Well, as a wine programmer, I often will munge up the whole damn thing, so I use my super special killwine script. This is a hard death (wineserver -k is the nice way to do it and always preferred).



if (($#)); then
    if [[ -e "${wine_cellar}/$1" ]]; then
    elif [[ "${1:0:1}" != "-" ]]; then
        echo "ERROR: Didn't understand argument '$1'?" >&2;
        exit 1

if ((${#WINEPREFIX})); then
        grep -l "WINEPREFIX=${WINEPREFIX}$" $(
            ls -l /proc/*/exe 2>/dev/null |
            grep -E 'wine(64)?-preloader|wineserver' |
            perl -pe 's;^.*/proc/(\d+)/exe.*$;/proc/$1/environ;g;'
        ) 2> /dev/null |
        perl -pe 's;^/proc/(\d+)/environ.*$;$1;g;'
        ls -l /proc/*/exe 2>/dev/null |
        grep -E 'wine(64)?-preloader|wineserver' |
        perl -pe 's;^.*/proc/(\d+)/exe.*$;$1;g;'

if ((${#pids})); then
    set -x
    kill $* $pids

This assumes that you're wine prefixes are under ~/.local/share/wine. Usage examples are:

killwine                       # Just kill all instances of wine
killwine -9                    # Hard kill them all
killwine lotro                 # Only kill wine under ${HOME}/.local/share/wine/lotro
killwine -INT lotro            # Same as above, but use SIGINT
WINEPREFIX=/tmp/crap killwine  # Kill only the instance under /tmp/crap
sudo reboot                    # Pretend you're running windows.

I don't know, but I don't think you'll often end up with various processes hung in memory (what this script takes care of) on a normal or even normal+staging release, but I do quite a lot because of hacking the server and ntdll.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.