Updated: 9 November 2026 · Applies to: Kali Linux rolling (2026.3 and later) with LightDM 1.33 (Xfce, the default desktop) or GDM 51 (GNOME desktop)

To log in to Kali Linux automatically, open /etc/lightdm/lightdm.conf as root, find the [Seat:*] section and set autologin-user=kali and autologin-user-timeout=0 (use your own user name instead of kali). Reboot, and the Xfce desktop starts without the login screen. If you installed Kali with the GNOME desktop, the setting goes in /etc/gdm3/daemon.conf instead, as shown further down.

Which display manager does your Kali use?

The display manager is the program that shows the graphical login screen. Kali's default Xfce desktop uses LightDM, and the GNOME desktop uses GDM3 (the kali-desktop-xfce package depends on lightdm, and kali-desktop-gnome depends on gdm3). Check which one you have:

cat /etc/X11/default-display-manager

Output on a default Kali install:

/usr/sbin/lightdm

If it shows /usr/sbin/gdm3, skip to the GDM3 section.

Enable autologin with LightDM (Xfce, default)

  1. Open a terminal and edit the configuration file:
    sudo nano /etc/lightdm/lightdm.conf
  2. Find the [Seat:*] section. In the file Kali ships, the autologin lines are there but commented out:
    #autologin-guest=false
    #autologin-user=
    #autologin-user-timeout=0
  3. Remove the # and add your user name, so the two lines read:
    autologin-user=kali
    autologin-user-timeout=0
    autologin-user-timeout=0 means no delay. A number such as 10 shows the login screen for ten seconds first, so another user can still choose a different account.
  4. Save the file (Ctrl+O, Enter, Ctrl+X in nano) and reboot.

Both changes can also be made in one command. It only replaces the two commented lines shown above, so check the result afterwards:

sudo sed -i 's/^#autologin-user=$/autologin-user=kali/; s/^#autologin-user-timeout=0$/autologin-user-timeout=0/' /etc/lightdm/lightdm.conf

Confirm what LightDM will use:

sudo lightdm --show-config

Output from our Kali test container (LightDM 1.33.1):

   [Seat:*]
A  greeter-session=lightdm-greeter
A  greeter-hide-users=true
A  session-wrapper=/etc/X11/Xsession
B  autologin-user=kali
B  autologin-user-timeout=0

Sources:
A  /usr/share/lightdm/lightdm.conf.d/01_debian.conf
B  /etc/lightdm/lightdm.conf

If the autologin-user line is missing from this output, it is still commented out or sits in the wrong section.

Cleaner option: a drop-in file

Instead of editing the main file, you can put the setting in its own file, which a package update will not touch. LightDM reads files in /etc/lightdm/lightdm.conf.d/:

sudo mkdir -p /etc/lightdm/lightdm.conf.d
printf '[Seat:*]\nautologin-user=kali\nautologin-user-timeout=0\n' | sudo tee /etc/lightdm/lightdm.conf.d/50-autologin.conf

lightdm --show-config then lists /etc/lightdm/lightdm.conf.d/50-autologin.conf as the source of the two settings. To turn autologin off again, delete that file and reboot.

Enable autologin with GDM3 (GNOME desktop)

Edit /etc/gdm3/daemon.conf:

sudo nano /etc/gdm3/daemon.conf

Under [daemon], the file from the gdm3 51.1 package has these lines commented out:

[daemon]

# Enabling automatic login
#  AutomaticLoginEnable = true
#  AutomaticLogin = user1

Change them to:

[daemon]
AutomaticLoginEnable = true
AutomaticLogin = kali

Save and reboot. The same file also has a timed login option (TimedLoginEnable, TimedLogin and TimedLoginDelay in seconds), which logs the user in after a delay unless someone picks another account.

Autologin as root does not work

Kali's LightDM autologin PAM file (/etc/pam.d/lightdm-autologin) contains the rule auth required pam_succeed_if.so user != root quiet_success, so automatic login is refused for root. Use your normal user and sudo for admin tasks.

What is the Kali default login?

According to Kali's documentation, the live image and Kali's pre-created images (for example the virtual machine images) use the user name kali and the password kali. An installed system has no default account: the installer asks you to create a user, and that is the name you put in autologin-user. If you use a pre-built image, change the password with passwd before you enable autologin or allow remote access.

Security notes

  • Autologin means anyone who can switch the machine on gets your desktop and your sudo rights (sudo still asks for your password, but your files and browser sessions are open). Use it only on a personal laptop or a lab virtual machine.
  • Do not use it on a Kali machine that others can reach. If you run SSH on Kali, see How to install SSH (secure shell) service on Kali Linux and use key logins instead.
  • Autologin only skips the graphical login. Terminal and SSH logins still need a password or key.

Related articles

Official documentation: Kali Linux default credentials.

Related services

Kali Linux VPS

pre-installed with VNC and full root for pentesting labs.

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Was this answer helpful?

Still stuck? Open a ticket