First do this:
sudo mkdir -pv /etc/systemd/system/getty@tty1.service.d sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
This will edit a new file autologin.conf
. Here is the text for it:
[Service] ExecStart= ExecStart=-/sbin/agetty --autologin $username --noclear %I 38400 linux
Make sure you replace “$username” with the username with which you want login to occur.
If, peradventure, you would like X to automatically start up after the above autologin to text, add the following to ~/.profile:
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
You will also have to remove the desktop manager which is running, e.g., lightdm.