go to /etc/systemd/system/getty.target.wants/

edit file getty@tty1.service

This file is a symbolic link.

A symbolic link (also known as a soft link or symlink) is a special type of file in file systems that points to another file or directory. Instead of containing the file or directory’s data, the symbolic link contains the path to the original file or directory.

getty@tty1.service is a systemd service that is responsible for starting a terminal session on tty1 (terminal 1) of a Linux system.

you can name getty@tty2.service to control the console named tty2, same with tty3 etc..

the content of the service file which is a symbolic link:

[Unit]
Description=Getty on tty1
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Before=plymouth-quit.service
After=systemd-user-sessions.service

[Service]
ExecStart=-/sbin/agetty --noclear --autologin myuser --login-options '-f myuser' %I $TERM
Environment=PASSWORD=mypassword
Type=idle
Restart=always

[Install]
WantedBy=multi-user.target

The bad thing about this is that we have the password in a plain text file, it is insecure, but the purpose of this is for personal use.

Unit, Service, Install are sections of the service and contain properties, the sections are enclosed in brackets [ ].

Once the service has been edited, save and close the file, execute the following command:

sudo systemctl daemon-reload

then

sudo systemctl restart getty@tty1.service

and restart the computer

sudo shutdown -r now

and that’s it, you should automatically start logged in with a user.