Get the current session type, text-mode or graphical:

systemctl get-default

Set the current session type to text-mode by disabling gdm autostart:


systemctl set-default multi-user.target

Enable lightdm autostart:

systemctl set-default graphical.target