RackNerd Billboard Banner

How To Enable Automatic Login In Ubuntu Desktop And Server

If you want Ubuntu to boot straight into your user session without prompting for a password, enabling automatic login can save time—especially on a personal system or for single-user environments. This guide covers how to enable autologin on both Ubuntu Desktop and Ubuntu Server.

⚠️ Note: Automatic login bypasses password protection, so only enable it on trusted, secure systems.


🔧 Enable Automatic Login on Ubuntu Desktop

This is the easiest to configure thanks to the graphical interface and built-in settings.

Steps:

  1. Open Settings
    Go to SettingsUsers.
  2. Unlock Settings
    Click Unlock (top-right corner) and enter your password.
  3. Enable Automatic Login
    Toggle “Automatic Login” for your user account.

That’s it. Restart your system, and it will boot directly into your session.

If the toggle is greyed out, your account may be encrypted or managed by an external authentication service.


🛠️ Enable Automatic Login on Ubuntu Server

Ubuntu Server doesn’t use a graphical interface by default, so you’ll need to edit configuration files.

Step 1: Edit the Getty Service

Run this command to edit the systemd override for the login service:

sudo systemctl edit getty@tty1

Paste the following:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin yourusername --noclear %I $TERM

Replace yourusername with your actual username.

Save and close the file (Ctrl + X, then Y, then Enter in nano).

Step 2: Reload and Restart the Service

sudo systemctl daemon-reexec
sudo systemctl restart getty@tty1

Now your server will automatically log in to the console on boot.


⚠️ Important Notes

  • For security, do not enable autologin on public-facing servers or systems that store sensitive data.
  • You can still lock the session manually or switch users as needed.
  • On servers, autologin only applies to the primary TTY (terminal) session.

✅ Summary

VersionMethod
Ubuntu DesktopSettings → Users → Enable Automatic Login
Ubuntu ServerEdit getty@tty1 systemd service manually

Autologin is a useful feature when convenience outweighs the need for strict access control—just be sure you understand the trade-offs.


Want help with enabling autologin on Ubuntu variants like Xubuntu or Kubuntu? Drop a comment and I’ll guide you through.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

RackNerd Billboard Banner
0 Shares
Copy link