# Restart window server via command line



## Captain Code (Apr 21, 2005)

Does anyone know how to restart the window server through the command line?  Or maybe just the Finder.  Mine keeps locking up on a remote machine with no monitor, but SSH still works.  I want to try and restart the Finder or window server remotely to see if that fixes it instead of having to keep restarting it.

Something's wrong with it since it keeps freezing but with Tiger coming next week I don't want to reinstall anything now.


----------



## davidbrit2 (Apr 22, 2005)

Try "sudo killall WindowServer" and see if that helps. That looks like the first process spawned by init that handles the GUI.


----------



## Captain Code (Apr 22, 2005)

Will that restart it automatically?


----------



## davidbrit2 (Apr 22, 2005)

Don't know. Find out. ;-) I would hope init is smart enough to notice when the process dies and restart it, but that remains to be seen.


----------



## Darkshadow (Apr 22, 2005)

Well, you could always try killing the Finder first, then if that doesn't work kill the windowserver.


----------

