The file /etc/inittab
is not used under systemd
any longer. If you wanted, you could install systemv
and you would find yourself a brand new inittab
, but this would mean walking backward like crabs.
You can instead edit the file /lib/systemd/system/[email protected]
and change the line
ExecStart=-/sbin/agetty --noclear %I $TERM
to
ExecStart=-/sbin/agetty --noclear -a root %I $TERM
This just follows from the agetty manual page, which states, among other things:
-a
, --autologin username
Log the specified user automatically in without asking for a login name and password. The -f username
option is added to the /bin/login
command line by default. The --login-options
option changes this default behavior and then only \u
is replaced by the username
and no other option is added to the login command
line.
To be sure, I just tested this on my Debian VM, and it works fine.