I just installed Debian 9.2.1 on an old laptop as a cheap server. The computer is not physically accessed by anyone other than myself, so I would like to automatically login upon startup so that if I have to use the laptop itself rather than SSH, I don't have to bother logging in. I have no graphical environments installed, so none of those methods would work, and I've tried multiple solutions such as https://superuser.com/questions/969923/automatic-root-login-in-debian-8-0-console-only However all it did was result in no login prompt being given at all... So I reinstalled Debian. What can I do to automatically log in without a graphical environment? Thanks!

up vote 6 down vote accepted

Edit your /etc/systemd/logind.conf , change #NAutoVTs=6 to NAutoVTs=1

Create a /etc/systemd/system/getty@tty1.service.d/override.conf through ;

systemctl edit getty@tty1

Past the following lines

ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux

enable the getty@tty1.service then reboot

systemctl enable getty@tty1.service

Arch linux docs :getty

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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