How Do I Stop X Server

x-server can be stopped by stopping the display manager process associated with it. Procedure includes identifying the display manager as well.
Updated: July 19, 2023

/!\ Note: Current steps are intended for systemd-based distributions only. You can confirm you are using systemd by entering in a terminal: ps -p 1 -o comm=

1. Identify Current Display Manager

Use the command for your distro below to find your display manager in the command output. Example display managers: entrance-git, gdm, lightdm, lxdm, lxdm-gtk3, sddm, slim, xorg-xdm, xdm.

Ubuntu, Debian and Derivatives

cat /etc/X11/default-display-manager


cat /usr/lib/X11/displaymanagers/default-displaymanager

RedHat & Fedora


2. Stop Display Manager

Note: Instructions below are tested with lightdm. Replace your_display_manager with yours.

  1. Ctrl+Alt+F1
  2. sudo service your_display_manager stop
  3. confirm changes: Ctrl+Alt+F7 should give you a black screen
    to start again: sudo service your_display_manager start

Hi! Please help me improve this page.
If this doesn’t work for you, send feedback by voting NO below and sharing with me:
– what OS you are using,
– what is your display manager,
– what other difficulties you might have encountered.
I will try to update the page promptly. Thanks.


  1. lightdm – How do I kill the x-server? – Ask Ubuntu
  2. Is there a simple linux command that will tell me what my display manager is? – Unix & Linux Stack Exchange
  3. SDB:Change Display Manager – openSUSE Wiki
  4. Some Common Ubuntu Display Managers and How to Switch Between Them – VITUX
  5. Display manager – ArchWiki
  6. Check if You Are Using Systemd or Not in Linux

Did this solve your issue?