5

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"?

7

Autologin is performed as part of systemd's getty target:

root@raspberrypi:/etc/systemd/system/getty.target.wants# ls -l
total 0
lrwxrwxrwx 1 root root 38 Sep 24 18:14 getty@tty1.service -> /etc/systemd/system/autologin@.service

The raspi-config simply manipulates this symlink. To switch to manual login, execute (as root):

ln -fs /lib/systemd/system/getty@.service \
 /etc/systemd/system/getty.target.wants/getty@tty1.service

To switch back to automatic login, do:

ln -fs /etc/systemd/system/autologin@.service \
 /etc/systemd/system/getty.target.wants/getty@tty1.service

I wanted a system with no console prompt on tty1, so I removed this symlink altogether.

  • 3
    If you have removed the default user "pi", you must also update "/etc/systemd/system/autologin@.service". Update the username in the line ExecStart=-/sbin/agetty --autologin USERNAME --noclear %I $TERM. – skibulk Feb 1 '16 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.