Many of the hacking tools on Kali Linux require root privileges to execute, not to mention all the ordinary Linux commands that require it. If you're sick of having to preface commands with sudo and typing in the root password often, we have a couple of solutions for you.

You can login to the root user in terminal with the sudo -i command, as we explain in our guide on Kali Linux default password. Alternatively, you can see our guide on enabling root login in Kali in order to login to the GUI with the root account.

The last option is to provide a normal user account with root privileges. In this guide, we'll go through the step by step instructions to grant root privileges to a normal user account on Kali Linux.

In this tutorial you will learn:
  • How to provide user with root privileges on Kali Linux
Giving a user root permissions on Kali Linux
Giving a user root permissions 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

Provide user with root privileges on Kali

Open a command line terminal and follow along with the steps below to give root privileges to a user account.

  1. Use the apt package manager to install the kali-grant-root package on your system. You may find that it's already installed, in which case you just need to configure it, as we show in the next step.
    $ sudo apt install kali-grant-root
    
  2. Next, configure the package we just installed by using the following command.
    $ sudo dpkg-reconfigure kali-grant-root
    

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


Make sure you select the option to enable password-less privilege escalation and proceed by pressing enter.

Select password-less escalation. Run this command again if you ever want to revert the setting.
Select password-less escalation. Run this command again if you ever want to revert the setting.

That's all there is to it. For all future commands that you wish to execute as root, you can use the sudo command, but will never be prompted for a password.

To verify it works, try logging out and back in, then type a command that would normally require root privileges.

$ sudo apt update

Closing Thoughts

In this guide, we saw how to provide a normal user with root privileges in Kali Linux. Using the steps in this guide, you can preface any command with sudo and never be hassled with entering a password. Kali developers must've known that some users would be annoyed when they disabled root login in recent versions, so they've given us multiple ways to restore functionality back to what it was.

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.