To test whether anything is running in the prefix: wineserver -k0 To wait for the wine prefix to shut down: wineserver -w To cleanly shut down all the processes in the wine prefix: wineboot --end-session --shutdown --force --kill (Note that wineboot can fail if a program cancels the shutdown process, and unlike the wineserver commands this will also start up the prefix if there isn't anything running.) To kill all programs in the prefix: wineserver -k For all of these commands you will have to set WINEPREFIX to the value you want, of course.