Ubuntu Linux autologin command line ( CLI )

I just thought I would share something that I have found useful on my systems that are not touched by other people.

If you have been looking for a simple way to have a specific user autologin on a specific tty screen on your Ubuntu linux system this will make things easy.

There are normally 6 console windows that are created for you to login on. tty1 to tty6

Now if you want to make tty6 autologin to lets say a user account called steam then what you want to do is this:
sudo nano /etc/init/tty6.conf
Inside you will see:

# tty6 - getty
#
# This service maintains a getty on tty6 from the point the system is
# started until it is shut down again.

start on runlevel [23] and not-container

stop on runlevel [!23]

respawn
exec /sbin/getty -8 38400 tty6

Now the simple thing you need to do is add a “-a steam”, without the quotes, between getty and -8.
Of course you would want to replace steam with what ever user account you wanted to autologin.
Now the edited tty6.conf will now look like:

# tty6 - getty
#
# This service maintains a getty on tty6 from the point the system is
# started until it is shut down again.

start on runlevel [23] and not-container

stop on runlevel [!23]

respawn
exec /sbin/getty -a steam -8 38400 tty6

Now the same process would be used to edit tty1.conf to tty5.conf

The next time you reboot your system and/or power on the system those terminal windows should autologin.

Hope this is useful to someone out there 😀