by lunarg on March 21st 2019, at 12:24

The quickest way to enable auto-logon on Ubuntu 16.04+ and Debian (which are using systemd for management of their services) is by creating an override for the getty service, specifically for tty1 (or another tty if you prefer).

First, determine which tty you wish to have the auto-logon on. These are the terminals linked to the Alt+Fn keys, so tty1 = Alt+F1, tty2 = Alt+F2. The default is always tty1.

Next, create an override by typing:

sudo systemctl edit getty@tty1.service

This will open up a text editor where you can adjust the parameters like so:

ExecStart=-/sbin/agetty --noissue --autologin myusername %I $TERM

Replace myusername with the account you wish to auto-logon.

Alternate solution (for automated installs)

If you are performing automated installs (e.g. kickseed), you can also manually create the required directories and files to get the same result. All service configuration files are stored in /etc/systemd.

Create the folder:

mkdir -p /etc/systemd/system/getty@tty1.service.d

Open your favourite text editor and create the contents as mentioned before.

Save the file as /etc/systemd/system/getty@tty1.service.d/override.conf

With automated installs (e.g. kickseed), you can script to have the directory created and then copy the override.conf file to enable auto-logon.

« April 2019»
« Most people tend to avoid true conflict. Ironically this breeds more conflict. »