Automated Login In Arch Linux

July 20, 20191 minute

Now that I'm using Arch Linux + i3-gaps everywhere with encrypted installs logging in after typing my encryption password has become slow and annoying. With the following steps you'll only have to type your encryption password during boot and the rest of the system will start up as normal.

This works well for my setup where I run startx immediately after logging in with this script in my .zshrc file on an encrypted partition. I do not recommend doing this if you don't encrypt your stuff!

Create a directory named [email protected]/ inside the systemd system unit files directory:

sudo mkdir -p /etc/systemd/system/[email protected]/

Create a file in this folder called override.conf with the following content:

# /etc/systemd/system/[email protected]/override.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin YOUR_USERNAME_HERE --noclear %I $TERM

That's it! On next reboot, it will skip the tty1 login step and go straight to your window manager.

If you liked this post or just spotted an annoying error, I'd love to hear your thoughts and ideas on Twitter. I promise I'm not scary 😬