Enable root login in Kali Linux
Open a terminal and follow the instructions below to enable root login in your GUI.
1. First of all, open terminal, type and execute the following command to install kali-root-login
sudo apt update

Now type another given command, press enter button as shown below:
sudo apt install kali-root-login

Now, you have to set the root password using the following command. To execute this command, you must enter your password at least twice. However, you can also use the same password that you used for your regular non-root account.
sudo passwd

As you can see in the image above, we have successfully set up a password for the root account. You can now return to the login screen by switching users, logging out or rebooting the system.
To login as superuser (or root user) you need to enter the username root, in our case “root” and enter the correct password that we just set up with the root user in the previous steps .

Now you can login to GUI as root user or non-root user depending on your requirement.




