Automatic login to virtual console
This article describes how to automatically log in to a virtual console at the end of the boot process. This article only covers console log-ins; see Start X at Login for information about automatic login into Xorg.
Configuration relies on systemd drop-in files to override the default parameters passed to agetty.
Configuration differs for virtual versus serial consoles. In most cases you want to setup up automatic login on a virtual console, (whose device name is
N is a number). The configuration of automatic login for serial consoles will be slightly different. Device names of the serial consoles look like
N is a number.
Create the following file (and leading directories):
[Service] ExecStart= ExecStart=-/usr/bin/agetty --autologin username --noclear %I 38400 linux
Type=idlewill delay the service startup until all jobs (state change requests to units) are completed. When using
Type=simple, the service will be started immediately, but boot-up messages may pollute the login prompt. This option is particularly useful when starting X automatically. To use this option, add
If you want to use other tty than tty1 see Systemd FAQ.
Create the following file (and the leading directories):
[Service] ExecStart= ExecStart=-/sbin/agetty --autologin username -s %I 115200,38400,9600 vt102