How to enable automatic login in Kali Linux

  1. Check your display manager (default is Lightdm):
cat /etc/X11/default-display-manager
/usr/sbin/lightdm

2. If it’s LightDM, then edit the configuration file:

locate lightdm.conf
/etc/lightdm/lightdm.conf
sudo nano -l /etc/lightdm/lightdm.conf
uncomment line 126 (delete #):
#autologin-user=
make it look like
autologin-user=your_user_name_here
then
Ctrl + O to save
Ctrl + X to quit
reboot or re-login your machine

3. Else if it’s Gnome, then edit deamon.conf file:

cat /etc/X11/default-display-manager
/usr/sbin/gdm3
locate daemon.conf
sudo nano -l /etc/gdm3/daemon.conf
delete comment from lines:
AutomaticLoginEnable = true
AutomaticLogin = your username