[systemd-devel] permanent autologin

Silvio Knizek killermoehre at gmx.net
Sat May 1 15:05:59 UTC 2021


Am Samstag, dem 01.05.2021 um 07:17 +0200 schrieb Emanuel Berg:
> I do autologin like this:
>
>    ExecStart=-/sbin/agetty -a incal --noclear %I $TERM
>
>    /etc/systemd/system/getty.target.wants/getty at tty1.service # line ~39
>
>    $ sudo systemctl daemon-reload
>
> However, it seems to disappear after a while, maybe when
> systemd gets updated?
>
> So my question is how do I make the autologin
> change permanent?
>
Hi Emanuel,

your path is wrong. You want the following:

--- /etc/systemd/system/getty at tty1.service.d/10-autologin.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty -a incal --noclear %I $TERM
---

This creates a single overwrite for only this one instanciated unit.
The first empty ExecStart= is for technical reasons.

Do you need this auto login for debug reasons (than maybe debug-
shell.service is better suited), do you want to start a terminal
1application (than maybe use a normal .service with TTYPath), or do you
start graphical applications (use a login manager with auto login
instead)?

BR
Silvio



More information about the systemd-devel mailing list