How to configure Linux so you can start and exit GUI without rebooting

Delta Fox Design     Home > How To > Configure Linux so you can start and exit GUI

I figured out how to configure #Linux so you can start and exit the GUI any time you want, without restarting the computer. Seems like it’s just a mater of disabling your Display Manager (DM).

Try it if you want. (Different Linux OSs may require different steps. The OS I tried this on uses lightdm, but if you use a different DM you will have to replace "lightdm" with what is used for your DM.)

1. Change to a different TTY (Ctrl+Alt+F#)
(For me I used Ctrl+Alt+F1 for TTY1. Use the TTY that has just the terminal with no graphics.)

2. login as root (you might be able to login with a non root account and just add "sudo " to the following commands.)

3. Run the commands:
systemctl stop lightdm
systemctl disable lightdm

And that should do it. Now your system should boot to a terminal, and you can start the GUI manually with the command "startx", when you log out it will drop you to a terminal.

To undo this: Running: systemctl enable lightdm (or whatever DM you are using), then restarting, should revert your OS to the way it was before.

Note: I have wondered for a long time if Linux could be configured like this. So I am really exited I figured out how to do it.

PS: Knowing how to change your TTY (which you learned in step 1) also has other uses. For example, if your GUI crashes you can switch to a terminal only TTY and run "shutdown now" to shutdown your system.

Originally posted by me on my SpaceHey Configure Linux so you can start and exit GUI without rebooting - Jacob Persico's Blog | SpaceHey. This version you are reading was edited somewhat for clarity.

Valid HTML5 Valid HTML5