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?
ln -fs /lib/systemd/system/getty@.service /firstname.lastname@example.org
ln -fs /etc/systemd/system/autologin@.service /email@example.com
nonintmode. If you want to configure this as part of a script, issue
raspi-config nonint do_boot_behaviour Bn, where
nis 1-4 depending on the boot mode you need.