Restart X Server On Ubuntu

To restart your X server, use 

sudo systemctl restart display-manager

 (Ubuntu/modern systems) or

 sudo service lightdm restart

 For an immediate hard reset, use

 Ctrl+Alt+Backspace

 (if enabled) or switch to a TTY

 Ctrl+Alt+F2

 log in, and run 

sudo pkill X 

or 

sudo killall Xorg

Ask Ubuntu

 
Methods to Restart X Server
Systemd Command

 (Recommended):

 Use

 sudo systemctl restart display-manager 

to restart the active display manager (GDM3, LightDM, SDDM).

Service Command:

 sudo service lightdm restart 

(for LightDM).

Kill Process: 

sudo pkill X 

or 

sudo killall Xorg

 forces the X server to terminate and restart.

Keyboard Shortcut:

 Ctrl+Alt+Backspace 

may kill the session, though this is sometimes disabled by default.

Virtual Console: Press 

Ctrl+Alt+F2 

to log in to a console, then run the restart command. 

Ask Ubuntu

 
Note: 

Restarting the X server will close all open graphical applications and log you out. 

Ask Ubuntu

Comments

Popular Posts