I've uninstall the GUI, and I also want to disable automatic login at the command line. I've read that you should use the raspi-config utility to do this. I select the first option and reboot, and it has no effect.
How does one "do this manually"?
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
Autologin is performed as part of
root@raspberrypi:/etc/systemd/system/getty.target.wants# ls -l total 0 lrwxrwxrwx 1 root root 38 Sep 24 18:14 firstname.lastname@example.org -> /etc/systemd/system/autologin@.service
raspi-config simply manipulates this symlink. To switch to manual login, execute (as root):
ln -fs /lib/systemd/system/getty@.service \ /email@example.com
To switch back to automatic login, do:
ln -fs /etc/systemd/system/autologin@.service \ /firstname.lastname@example.org
I wanted a system with no console prompt on
tty1, so I removed this symlink altogether.
I solved this by looking at exactly what raspi-config does.
sudo systemctl set-default multi-user.target sudo ln -fs /lib/systemd/system/getty@.service /email@example.com sudo rm /firstname.lastname@example.org/autologin.conf
This is B1 Console in raspi-config. For other alternatives go to do_boot_behaviour in raspi-config source file. To find source file, use:
The autologin process is controlled by email@example.com. And the config file
autologin.conf under the folder
/firstname.lastname@example.org/ is a drop-in file. You can just change the file name to
autologin.conf.bak then the username and password prompt will show up on the next boot.