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:
[Service] ExecStart= ExecStart=-/sbin/agetty --noissue --autologin myusername %I $TERM Type=idle
Replace myusername with the account you wish to auto-logon.
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.
« ‹ | November 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |