Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

How to manage automatic login on Ubuntu Linux

Posted on 14/02/202127/08/2026 Christian By Christian No Comments on How to manage automatic login on Ubuntu Linux
  1. Home
  2. Linux
  3. How to manage automatic login on Ubuntu Linux
enable and disable automatic login on Ubuntu Linux

For best practice purposes, users are required to authenticate before logging on to a Linux device. This helps in ensuring that sensitive and personal information on the device is safe. But, if you are sure that the Linux system is placed in a secure environment and can be adequately monitored, then you can enable automatic login for your Linux device. Please see Implementation of Kiosk Mode using Local Settings: Single App Kiosk Setup, how to start an application automatically on macOS, and how to disable automatic screen lock on Ubuntu Desktop with the GUI and dconf Editor.

It is also worth noting that, whenever you try to install Ubuntu Linux, you are provided with the option to choose whether or not you want to use a password to log in to the device.

Here are some articles relating to this topic. How to disable or enable automatic login from the sign-in screen in Windows, how to enable or disable automatic login on macOS, how to prevent MacBook from automatically Logging out,

Embarking on disabling the sign-in screen is not a good idea as your device can be compromised.

You can only do this if you are the only user of your PC and you have restricted access to your PC. That being said, it is recommended you protect your PC with a Password, PIN, or biometric authentication. Do this only if you have restriction to the area where your Ubuntu device is located. See how to disable automatic screen lock on Ubuntu Desktop with the GUI and dconf Editor.

For Ubuntu 20:10

From the system menu, click on settings or hit the Apps button and click search for users as shown below.

Alternatively, you could use the “Activities” button and search for users. Which ever step you embark on, the Settings window will be displayed.

Open the User Settings

This will open up the Users settings window as shown below. Notice that the option to disable automatic logon is grayed out.

To do this, you will have to click on the “Unlock” button as shown below in order to change the user settings.

Click on Unlock Button

Next, you will receive a prompt to enter your password to apply the changes. Without entering the password, you will not be able to enable the automatic logon.

Enter your password

Upon authentication, you should be able to switch on the Automatic login as shown below. That is all that is needed to enable automatic login in Ubuntu 20:10

automatic Login is now switched on
To disable automatic login in Ubuntu 20:10, kindly repeat the process and switch the Ubuntu Automatic Login off.

For Ubuntu 18:04

To enable automatic login for this version of Linux, click on the “Activities” button and search for the user or from the system menu as well.

For me, I will click on the All Settings button tied to the dock as shown in the images below. This will open the “All Settings” window and click on the Details button

Open all setings

This will open the Details window. Please click on the Users menu as shown below. As you can see, the button to switch the automatic login on is grayed out.

To enable this, you will have to click on the Unlock button as shown below.

Click on the Unlock button

Next, you will receive a prompt to enter your password in order to apply the changes. Enter your password and click on Authenticate.

Enter your password

Now you should be able to switch the automatic login button on as shown below. If you ever want to disable the automatic login, kindly repeat the entire process and switch to the button off.

automatic Login is now turned on

For Ubuntu 16:04

To enable automatic login for this version of Linux, click on the “Activities” button and search for the user as shown in the images below.

This will open the “All Settings” window. Click on User accounts.

Search for Users account
Search for Users account
Screenshot 2021 02 13 at 01.25.40
Click on User account

This will open the User Accounts window.. To enable the automatic login, you will have to click on the “Unlock” button.

Click the unlock button

Next, you will receive a prompt to enter your password in order to authenticate.

Enter your password

Now you should be able to switch the automatic login button on as shown below. If you ever want to disable the automatic login, kindly repeat the entire process and switch the button off.

User account settings interface displaying account details for 'Christian Eromosele', with options for password, automatic login, and last login status.

Via the command line

You will need to perform this task with superuser privileges. To enable or disable the automatic login in Ubuntu Linux via the command line, please perform the following operations below. Search for and launch the Terminal through the Application Launcher or use the Super/Windows key.

I will be using Vim but Nano is readily available to do. If you are you use vim, ensure it is installed previously.
Terminal window displaying the command to install the Vim text editor using 'sudo apt install vim' on a Linux-based system, along with package installation progress details.

Using the following command below, edit the daemon.conf file in any of your favorite editors through the following command.

Terminal window showing a command input to edit the custom.conf file in the /etc/gdm3 directory using vim, including a prompt for the user's password.
$ sudo vim /etc/gdm3/custom.conf

In the daemon.conf file opened, you will have to uncomment some selected lines out by removing the pound symbol # at the beginning of each line.

This will ensure the interpreter ignores the commented lines when reading through a configuration file.

Screenshot of a command-line interface showing GDM configuration settings for enabling automatic login, with specific lines highlighted for emphasis.
Note: Ensure to replace "user1" with your name or the desired username.

Disable Automatic Login via the Command-Line

To disable automatic login on Ubuntu Linux for the user, simply edit the “custom.conf” again. Add the pound symbol # back.

This means that in our file, the automatic login feature for “christian” or if you decide to change it back to user1 has been disabled.

AutomaticLoginEnable=true
Automatic Login=user1
Terminal window displaying GDM configuration settings with comments for enabling automatic login and timed login.

Once ready, reboot your system to confirm the settings using the command below.

$ sudo reboot

I hope you found this blog on How to enable and Disable automatic login on Ubuntu Linux post helpful. If you have any questions, please let me know in the comment session.

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Linux Tags:Auto Logon, Automatic login, automaticstartup, Linux distro, login, logon, Ubuntu

Post navigation

Previous Post: How to set up a self-hosted speed test server on Ubuntu Linux
Next Post: How to activate DriveLock License on Windows Server

Related Posts

  • linuxnethero
    Adding a subnetwork interface to an existing network interface Linux
  • Screenshot 2022 04 13 at 21.38.35
    Check Weather Conditions via Command Line on Windows, macOS, Linux and Web Linux
  • Jenkins
    How to Install Jenkins Automation Server on Ubuntu 20.04 LTS Linux
  • 517443 637084112713220326 16x9 1
    How can I tell if a password is set for a user account on Linux Linux
  • Groovy
    How to install Groovy on Linux and Windows Configuration Management Tool
  • Convert PEM to PPK 1
    Convert a PEM Key to a PPK Key on a Linux and Windows AWS/Azure/OpenShift

More Related Articles

How to use Netstat.exe to confirm which Program uses or blocks a port How to use Netstat.exe to confirm which Program uses or blocks a port Linux
Featured image WSL2 installation How to install WSL2 on Windows Server Linux
image 129 Using Awx to deploy, schedule and run playbooks Linux
Run Linux on Windows Server How to install Windows Subsystem for Linux on Windows Server Linux
redisf How to install Redis on Linux System Linux
Screenshot 2020 05 14 at 18.00.59 Linux Error 13: Permission denied – Are you root Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

Top 30 Sysadmin blog

veeaam100

Veeam Vanguard

  • ADV Banner part2 e1782678615828
    Azure Virtual Desktop: Manage Azure Virtual Desktop host pools and session hosts using the Azure portal [Part 02] AWS/Azure/OpenShift
  • How to Make More Space Available on the Windows 11 Taskbar
    How to Make More Space Available on the Windows 11 Taskbar Windows
  • Screenshot 2020 05 13 at 22.49.32
    Fix for a boot image was not found for HyperV Virtual Machine Virtualization
  • whatsappImage
    How to add WhatsApp UWP on Windows 11 Windows
  • Fixing TPM Vulnerability
    How to fix a vulnerable Trusted Platform Module [TPM] Windows
  • Create a self signed cert via IIS
    How to create a self-signed cert via IIS Windows
  • banner
    What is Phishing Resistant Multi-Factor Authentication? Security | Vulnerability Scans and Assessment
  • Time machine
    How to Backup MacOS to Synology NAS via Time Machine Backup

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,738 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.