What if I'd like to exit the X session to use raw console without any X process running? I know I can always press Ctrl+Alt+F1/F6 to switch between a raw console and a graphical environment, but some times I just want the last to be gone (for technical reasons). So how to shut it down correctly, preventing from being automatically respawned?
To Stop X.Org Server:
To Start X.Org Server:
To Restart X.Org Server:
In all cases, replace
When you type sudo service lightdm stop, it replies lightdm stop/status: This is a clue.