The X.Org Server is the core component of the X Window System, which provides a graphical interface for Linux and Unix-like operating systems. To stop the X.Org Server, you can use one of the following methods:
init system:If your system uses the init system, you can use the init command to stop the X.Org Server. For example, on Ubuntu or Debian, you can use the following command:
sudo init 3
This will stop the X.Org Server and switch to runlevel 3, which is a multi-user command-line mode.
systemctl command:If your system uses the systemd init system, you can use the systemctl command to stop the X.Org Server. For example, on CentOS or Fedora, you can use the following command:
sudo systemctl stop gdm
This will stop the X.Org Server and switch to a command-line login prompt.
telinit command:If your system uses the sysvinit init system, you can use the telinit command to stop the X.Org Server. For example, on CentOS or Fedora, you can use the following command:
sudo telinit 3
This will stop the X.Org Server and switch to runlevel 3, which is a multi-user command-line mode.