Until recently, Kali Linux used the root account by default. In the latest versions of Kali, root login is disabled, forcing you to login to the GUI as your normal user account. The reasoning behind this change should be obvious, but if you're a Kali user, you probably know your way around a Linux system by now, and there's not much risk in letting you use the root account to login. Kali developers must've known that this change would annoy some people, because they've made it very convenient to re-enable the root login.

In this guide, we'll go through the step by step instructions to enable root login in Kali Linux. This will permit you to login to the GUI as root. Of course, we're already able to login to root on the terminal with the sudo -i command.

NOTE
You can always execute commands as root, while still using your normal user account, by prefacing commands with sudo. For help with using sudo or logging into the root account in terminal, see our guide on Kali Linux default password.
In this tutorial you will learn:
  • How to enable root login on Kali Linux
Logged into the root account in GUI on Kali Linux
Logged into the root account in GUI on Kali Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Kali Linux
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

Enable root login in Kali

Open a terminal and follow the steps below to enable root login in your GUI.

  1. First, use the apt package manager to install the kali-root-login package.
    $ sudo apt update
    $ sudo apt install kali-root-login
    
  2. Install the kali-root-login package with apt command
    Install the kali-root-login package with apt command
  3. Next, you need to set the root password with the passwd command. Even just setting it to the current password of your user account is fine, but this command must be run.
    $ sudo passwd
    [Enter password twice]
    

    SUBSCRIBE TO NEWSLETTER
    Subscribe to our NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  4. Now you can return to the login screen by switching users, logging out, or restarting the system.

    Switch user or log out of your current session to access root account
    Switch user or log out of your current session to access root account
  5. Login with the root user account and the password you just set in the previous steps.

    Login with root account
    Login with root account

That's all there is to it. You can now log in to the GUI as root, and of course your normal user account if you want.

Closing Thoughts

In this guide, we saw how to enable root login on Kali Linux. By default, we are already able to login to the terminal as root with the sudo -i command, but root login for the GUI was disabled in the latest versions of Kali. After following these steps, you're now able to login to both GUI and terminal as root.

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.