🧹

This post is over 1 year old and may be out of date or no longer relevant. If you find any problems with this post you can let me know by submitting an issue or editing this page.

Automated Login In Arch Linux

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 getty@tty1.service.d/ inside the systemd system unit files directory:

sudo mkdir -p /etc/systemd/system/getty@tty1.service.d/

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

# /etc/systemd/system/getty@tty1.service.d/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.

🎧 Nothing playingShow history