{"id":46581,"date":"2024-05-14T14:05:08","date_gmt":"2024-05-14T14:05:08","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=46581"},"modified":"2024-05-14T14:05:08","modified_gmt":"2024-05-14T14:05:08","slug":"enable-automatic-login-in-ubuntu-24-04-flavors","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2024\/05\/enable-automatic-login-in-ubuntu-24-04-flavors\/","title":{"rendered":"Enable Automatic Login in Ubuntu 24.04 &#038; Flavors"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/login-figure.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-45668\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/login-figure-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/login-figure-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/login-figure-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/login-figure-700x700.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/login-figure-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/02\/login-figure.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>This simple tutorial shows how to automatically login a user account in Ubuntu 24.04 and its flavors, such as KUbuntu 24.04, XUbuntu 24.04, Ubuntu MATE 24.04, and Ubuntu Unity 24.04.<\/p>\n<p>The auto login feature is handled by the display manager service in most Linux. It varies depends on your desktop environment and user configuration.<\/p>\n<p><b>Here I&#8217;m going to show you how to enable this feature, either using graphical setting option or by editing config file from command line. Choose either one that you prefer.<\/b><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/jammy-loginbackground.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-39284\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/jammy-loginbackground-600x290.jpg\" alt=\"\" width=\"600\" height=\"290\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/jammy-loginbackground-600x290.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/jammy-loginbackground-300x145.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/jammy-loginbackground-768x371.jpg 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/04\/jammy-loginbackground.jpg 1366w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<h3>Option 1: Use Graphical Option to Enable Auto-Login<\/h3>\n<p>Most Desktop Environments provide their own setting options for enable this behavior.<\/p>\n<h4>For GNOME (default in Ubuntu 24.04)<\/h4>\n<p>For the default GNOME Desktop, simply press <b>Super (Windows Logo) + S<\/b> to trigger top-right system status menu (aka Quick Settings), then click open &#8220;Settings&#8221;.<\/p>\n<p>Then, navigate to <b>System<\/b> in left, and click on <b>Users<\/b> in right. Click &#8220;Unlock&#8221; and type your password to authenticate. Finally, select the user account and turn on the &#8220;Automatic Login&#8221; option for it.<\/p>\n<p>For <strong>Ubuntu 22.04<\/strong> and earlier, &#8220;Users&#8221; setting is available in left rather than &#8216;System&#8217; page.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-autologin.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46583\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-autologin-700x565.webp\" alt=\"\" width=\"610\" height=\"492\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-autologin-700x565.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-autologin-300x242.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-autologin-768x620.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-autologin.webp 1043w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4>Ubuntu MATE 24.04<\/h4>\n<p>For Ubuntu MATE 24.04, just launch <b>Control Center<\/b> from start menu. When it opens, navigate to Administration -&gt; MATE User Manager.<\/p>\n<p>In the next dialog, choose your user account, click &#8220;Unlock&#8221; and authenticate with your password, finally turn on the &#8220;Automatic login&#8221; toggle option.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/mate-autologin.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46584\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/mate-autologin-700x480.webp\" alt=\"\" width=\"610\" height=\"418\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/mate-autologin-700x480.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/mate-autologin-300x206.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/mate-autologin-768x527.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/mate-autologin.webp 998w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4>KUbuntu 24.04 \/ Ubuntu Studio 24.04<\/h4>\n<p>For KUbuntu and Ubuntu Studio with Plasma Desktop, launch <b>System Settings<\/b> then search &amp; open <b>Login Screen<\/b> from left.<\/p>\n<p>Then click <b>Behavior<\/b> button in bottom, finally turn on &#8220;Automatically log in&#8221; checkbox, choose username and session. For choice, you may enable &#8220;Log in again immediately after logging off&#8221;.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/kubuntu-autologin.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46585\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/kubuntu-autologin-700x449.webp\" alt=\"\" width=\"610\" height=\"391\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/kubuntu-autologin-700x449.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/kubuntu-autologin-300x192.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/kubuntu-autologin-768x493.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/kubuntu-autologin.webp 1071w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4>Ubuntu Unity 24.04<\/h4>\n<p>For the Unity desktop, open <b>Settings<\/b> and navigate to <b>User Accounts<\/b>. In pop-up dialog, click &#8220;Unlock&#8221; (need authenticate with user password), choose user from left, and finally turn on &#8220;<b>Automatic Login<\/b>&#8221; toggle option.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/unity-autologin.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46586\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/unity-autologin-700x368.webp\" alt=\"\" width=\"610\" height=\"321\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/unity-autologin-700x368.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/unity-autologin-300x158.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/unity-autologin-768x404.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/unity-autologin.webp 858w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4>Ubuntu Cinnamon 24.04<\/h4>\n<p>For Cinnamon Desktop environment, open <b>System Settings<\/b> and click <b>Login Window<\/b> under Administration section.<\/p>\n<p>In pop-up dialog, switch to <b>Users<\/b> tab. Under &#8220;Automatic login&#8221;, inset the username you want to login automatically, and type a number if you want to delay the login with a few seconds.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/cinnamon-autologin.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46587\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/cinnamon-autologin-700x461.webp\" alt=\"\" width=\"610\" height=\"402\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/cinnamon-autologin-700x461.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/cinnamon-autologin-300x198.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/cinnamon-autologin-768x506.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/cinnamon-autologin.webp 1112w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h3>Option 2: Enable Auto Login by editing Config file<\/h3>\n<p>For XUbuntu, LUbuntu, and other Linux Desktop that you cannot find a graphical option, here&#8217;s how to enable auto login by editing the config file.<\/p>\n<h4>Find out Which Display Manager is in Use<\/h4>\n<p>Each desktop environment has its own default display manager. They are:<\/p>\n<ul>\n<li><b>gdm3<\/b> &#8211; GNOME Display Manager, that is default in GNOME Desktop (the default in Ubuntu).<\/li>\n<li><b>LightDM<\/b> &#8211; Light Display Manager, default in XUbuntu, Ubuntu MATE, Ubuntu Cinnamon, Ubuntu Unity.<\/li>\n<li><b>SDDM<\/b> &#8211; Simple Display Manager, that is default in KUbuntu, Ubuntu Studio, LUbuntu.<\/li>\n<\/ul>\n<p>In case you&#8217;ve changed something, you can press <b>Ctrl+Alt+T<\/b> to open terminal, and run command to check which display manager is currently in use:<\/p>\n<pre>systemctl status display-manager<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/check-display-manager.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46582\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/check-display-manager-700x505.webp\" alt=\"\" width=\"610\" height=\"440\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/check-display-manager-700x505.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/check-display-manager-300x216.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/check-display-manager.webp 706w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4>For GDM3 (GNOME Display Manager), default in Ubuntu<\/h4>\n<p>1. For gdm3 display manager that&#8217;s in use by default in <strong>GNOME<\/strong> Desktop, open up a terminal window (press Ctrl+Alt+T in Ubuntu), and run command to edit the config file:<\/p>\n<pre>sudo editor \/etc\/gdm3\/custom.conf<\/pre>\n<p><i>Replace <code>editor<\/code> with your system text editor, or use <code>nano<\/code> that works in most Linux<\/i>.<\/p>\n<p>2. When file opens in text editor, add following line (or un-comment the lines by removing # at the beginning) under <b>[daemon]<\/b> section (replace user &#8220;ji&#8221; to yours):<\/p>\n<pre>AutomaticLoginEnable = true\r\nAutomaticLogin = YOUR_USERNAME<\/pre>\n<p>Or, use the lines below instead that auto-login with delay:<\/p>\n<pre>TimedLoginEnable = true\r\nTimedLogin = YOUR_USERNAME\r\nTimedLoginDelay = 10<\/pre>\n<p>Finally, press Ctrl+S to save file, Ctrl+X to exit. The change will apply in next boot.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gdm3-autologin.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46588\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gdm3-autologin-700x505.webp\" alt=\"\" width=\"610\" height=\"440\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gdm3-autologin-700x505.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gdm3-autologin-300x216.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gdm3-autologin.webp 706w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4>Enable Auto-login for LightDM<\/h4>\n<p>1. For LightDM that is default in <b>XUbuntu<\/b>, <b>Ubuntu MATE<\/b>, <b>Ubuntu Unity<\/b>, and <b>Ubuntu Cimmaon<\/b>, open terminal (Ctrl+Alt+T) and run command:<\/p>\n<pre>sudo editor \/etc\/lightdm\/lightdm.conf.d\/autologin.conf<\/pre>\n<p>The command will create a &#8220;<code>autologin.conf<\/code>&#8221; file (change name to whatever as you want) under <code>\/etc\/lightdm\/lightdm.conf.d<\/code> directory, and edit with system default command line nano text editor.<\/p>\n<p>2. When file opens, add following lines and save it:<\/p>\n<pre>[SeatDefaults]\r\nautologin-user=YOUR_USER_NAME\r\nautologin-user-timeout=5<\/pre>\n<p>Here <code>autologin-user-timeout=5<\/code> is optional to show login-screen for 5 seconds until auto-login, in case you want to log into another user. When done editing, press Ctrl+S to save, and Ctrl+X to exit.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/xubuntu-auto-login.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46589\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/xubuntu-auto-login.webp\" alt=\"\" width=\"661\" height=\"460\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/xubuntu-auto-login.webp 661w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/xubuntu-auto-login-300x209.webp 300w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/a><\/p>\n<h4>Enable auto-login for SDDM<\/h4>\n<p>1. For SDDM display manager that is default in <b>KUbuntu<\/b>, <b>Ubuntu Studio<\/b>, <b>LUbuntu<\/b>, run the command (Ctrl+Alt+T) below instead to edit config file:<\/p>\n<pre>sudo editor \/etc\/sddm.conf.d\/auto-login.conf<\/pre>\n<p>Or edit <code>\/etc\/sddm.conf<\/code> if your system have it out-of-the-box.<\/p>\n<p>2. When file opens, in text editor add following lines (skip [Autologin] if already exist):<\/p>\n<pre>[Autologin]\r\nUser=YOUR_USER_NAME\r\nRelogin=true<\/pre>\n<p>Here <code>Relogin=true<\/code> is optional feature that automatically log in back once you log out. Sadly, SDDM seems not supporting auto-login delay at the moment of writing. See <a href=\"https:\/\/github.com\/sddm\/sddm\/issues\/1640\" target=\"_blank\" rel=\"noopener\">this request<\/a> page.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/sddm-autologin.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46590\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/sddm-autologin-700x438.webp\" alt=\"\" width=\"610\" height=\"382\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/sddm-autologin-700x438.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/sddm-autologin-300x188.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/sddm-autologin-768x480.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/sddm-autologin.webp 1280w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>When done editing the file, press Ctrl+S to save file and Ctrl+X to exit. Auto-login will apply at next boot.<\/p>","protected":false},"excerpt":{"rendered":"<p>This simple tutorial shows how to automatically login a user account in Ubuntu 24.04 and its flavors, such as KUbuntu 24.04, XUbuntu 24.04, Ubuntu MATE 24.04, and Ubuntu Unity 24.04. The auto login feature is handled by the display manager service in most Linux. It varies depends on your desktop environment and user configuration. Here [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":45668,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[51,2087],"class_list":["post-46581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-automatic-login","tag-ubuntu-24-04"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/46581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=46581"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/46581\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/45668"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=46581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=46581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=46581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}