Automatic login to virtual console

From ArchWiki
Revision as of 12:15, 29 December 2013 by Lahwaacz (talk | contribs) (Fix revision 287586 by Eca (talk))
Jump to: navigation, search

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.

The configuration differs for virtual and serial consoles. In most cases you would want to setup up autologin on virtual console, the one which device name is ttyN, where N is a number. The configuration of the autologin for the serial consoles will be slightly different. Device names of the serial consoles look like ttySN, where N is a number.

Virtual console

Create the following file (and the leading directories):

ExecStart=-/usr/bin/agetty --autologin username --noclear %I 38400 linux
Template error: are you trying to use the = sign? Visit Help:Template#Escape template-breaking characters for workarounds.

If you want to use other tty than tty1 see Systemd FAQ.

Serial console

Create the following file (and the leading directories):

ExecStart=-/sbin/agetty --autologin username -s %I 115200,38400,9600 vt102

Tips and tricks

Avoiding unnecessary dmesg errors

To avoid errors related to display-manager.service in dmesg, you should set the default target to multi-user instead of graphical:

# systemctl enable

See also