Linux Disable and Remove X Windows (X.org)

Linux Disable and Remove X Windows (X.org)

To disable and remove the X Window System (also known as X.org or X) on a Linux system, you can follow these steps:

  1. Stop the X Window System by running the following command:
refer‮:ot ‬lautturi.com
sudo service lightdm stop

This will stop the display manager (e.g., lightdm, gdm, kdm, etc.) that is responsible for starting the X Window System.

  1. Uninstall the X Window System packages using the package manager of your distribution. For example, on a Debian-based system (such as Ubuntu), you can use the apt-get command:
sudo apt-get purge xorg

On a CentOS or Red Hat Enterprise Linux (RHEL) system, you can use the yum command:

sudo yum erase xorg-x11-server-Xorg

This will remove the X Window System packages and any other packages that depend on them.

  1. To disable the X Window System from starting automatically at boot, you can edit the /etc/default/grub file and add the following line:
GRUB_CMDLINE_LINUX="text"

Then, run the following command to update the boot configuration:

sudo update-grub

This will configure the system to boot into text mode instead of starting the X Window System.

Note: These steps will disable and remove the X Window System from your system. After completing these steps, you will not be able to run graphical applications or desktop environments on your system. You will only be able to use the command line interface (CLI) or a text-based window manager (e.g., twm). If you want to re-enable the X Window System, you will need to install the X Window System packages and configure the system to start the X Window System at boot.

Created Time:2017-10-16 14:38:52  Author:lautturi