Home Linux Ubuntu How to Restart Ubuntu X Window Server From Command Line

How to Restart Ubuntu X Window Server From Command Line

284
0
Ubuntu restart X Server from command line

In today’s Linux guide, I’ll show you how to restart Ubuntu X Server from the command line or terminal. In some cases session might freezes and you’re stuck because don’t know what to do to resolved it.

If you’re wondering, X Server provides you with graphical desktop interface in the Linux environment. X server can freezes because of bugs from the graphic drivers.

For you to able to restart the X Server without restarting your Ubuntu machine, from the terminal run one of these commands:

Ubuntu 11.04 or newer using Gnome

sudo service gdm restart

Ubuntu 11.10 or newer using LightDM

sudo service lightdm restart

Ubuntu 11.10 or newer using KDE

sudo restart kdm

Ubuntu 15.04 or newer

sudo systemctl restart display-manager

Or, if you’re unsure what Ubuntu version currently running you can also use this command from the terminal, this code should work on all Ubuntu version:

sudo pkill X
READ:  How To Setup Apache 2.4, MariaDB 10.4, PHP 7.3 and HTTP/2 on Ubuntu 18.04 LTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here