How to kill and to start the X server?
In 12.04 How do you kill the X server from the command line and from the GUI interface and how do you start it from the virtual terminal?
24 Answers
One way to restart an instance of the X server is to run (from the commandline)
sudo service lightdm restartFor Ubuntu 15.04 and later:
sudo systemctl restart lightdm.serviceand for Kubuntu 15.04 and later:
sudo systemctl stop sddm.service 4 On 12.04, you can restart the server with the shortcut keys: Right Alt + Print Screen + K.
7In Ubuntu 14.04:
Press Ctrl+Alt+F1 and then run:
sudo service gdm stopor
sudo service lightdm stop… depending on your display manager.
NOTE: To recover use startx, alternatively replace the stop with start in either of the above commands.
Kill : xkill -a. -a means it will kill all display instances. For more information run man xkill.
Run : xinit.
Also startx but this command is to start an instance and not the server itself. For more information run man xint and man startx.
I don't believe it's possible to kill Xserver from GUI, and even if it were, it would not be the right way to do it.
4