I have found this thread on how to switch boot default behaviour on Raspbian Jessie from boot to command-line to boot to GUI and back.
Booting to command-line:
sudo systemctl set-default multi-user.target
Booting to GUI:
sudo systemctl set-default graphical.target
However, the same thread also indicates how to disable autologin, and while I got this to work for booting to command-line (and switching it back to autologin), booting to GUI always autologins. Are these commands incorrect?
Manual login:
ln -fs /lib/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
Autologin:
ln -fs /etc/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
raspi-config
supports anonint
mode. If you want to configure this as part of a script, issueraspi-config nonint do_boot_behaviour Bn
, wheren
is 1-4 depending on the boot mode you need.