Your cart is currently empty!
How to enable and disable automatic login on Ubuntu Linux via the GUI and CLI
Ubuntu makes it easy to manage user login settings, including automatic login. Whether you’re streamlining a home setup or locking down a shared machine, here’s how to enable or disable auto login using both the graphical interface and the command line.
🔧 Method 1: Enable/Disable Automatic Login via the GUI
This is the easiest route if you’re using Ubuntu Desktop.
✅ Enable Automatic Login
- Open Settings (gear icon in the system menu).
- Scroll down and select Users.
- Click Unlock (top-right) and enter your password.
- Select the user account you want to modify.
- Toggle Automatic Login to ON.
❌ Disable Automatic Login
Just reverse the process:
- Go to Settings > Users.
- Select the user.
- Toggle Automatic Login to OFF.
That’s it. Simple, fast, done.
💻 Method 2: Enable/Disable Automatic Login via the Command Line
If you’re working remotely, configuring headless systems, or just prefer the terminal, here’s how to do it using the CLI.
🔍 Step 1: Open a Terminal
You’ll need superuser privileges, so prefix with sudo
as needed.
✅ To Enable Automatic Login:
- Edit the GDM custom configuration file:
sudo nano /etc/gdm3/custom.conf
- Uncomment or add these lines under the
[daemon]
section:[daemon] AutomaticLoginEnable = true AutomaticLogin = your-username
- Save and exit (
Ctrl + O
,Enter
, thenCtrl + X
). - Reboot:
sudo reboot
Replace
your-username
with your actual Ubuntu username.
❌ To Disable Automatic Login:
Just set AutomaticLoginEnable
to false:
[daemon]
AutomaticLoginEnable = false
Then save, exit, and reboot.
🧠 Bonus Tip: Check Current Settings
To verify if auto login is active without opening a config file:
grep -i automatic /etc/gdm3/custom.conf
Final Notes
Automatic login is convenient, but it bypasses password security at startup. If you’re on a shared or sensitive system, it’s best left off. That said, for a kiosk, media center, or VM, it’s a time-saver.
Need to automate this via a script or during provisioning? Let me know—I can help write that too.