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
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.

This is a preview of a simpler page design that I'm working on over the next little bit. I've finally added a (click it!) but there's still a few pages left to be converted so don't worry if things don't look quite right just yet 🙏

Content on blog pages use the CC-BY-SA license. The source code and notes use the MIT license. Unsure? Mention me on Mastodon.