PDF download Download Article PDF download Download Article

In Linux, the root user account is the account that has access to all Terminal commands and files in the system. The root user can modify their Linux system in any way they choose. In most Linux distributions, including the most recent versions of Kali Linux, the root user account is disabled. This is to prevent users from damaging their system. However, you can unlock the root user account pretty easily in Kali Linux using the Terminal. Warning: Use caution when logged in as a root user. Mistakes can cause permanent damage to your system. You should only log in as a root user if you know what you are doing. [1]

Kali Root Terminal: How to Access in Linux

  1. Type sudo apt update into the terminal and press Enter.
  2. Type sudo apt install kali-root-login and press Enter.
  3. Type sudo -i and press Enter.
  4. Enter your user password and press Enter.
  5. Type passwd root and press Enter.
  6. Enter a new root password and press Enter, then retype it to confirm.
  7. Log out of your current user account and into the “root” account.
  1. Go ahead and use your normal username and password to log in to Kali Linux. Once you set a password for the root account, you can log in using the root account.
  2. On most Linux distributions, you can open the Terminal by clicking the Terminal icon in the Apps menu. It has an icon that resembles a black screen with a white cursor. You can also use the keyboard shortcut to open the Terminal, which is Ctrl + Alt + T .
    Advertisement
  3. This command updates the package manager in Kali Linux.
  4. This installs the root login package for Kali Linux, if it hasn't already been installed. [2]
  5. This command gives your current user account root access in the Terminal. [3]
    • If the administrator has blocked root access, you cannot grant yourself root access in the Terminal.
  6. You must enter your user password to switch to root access. If successful, the text cursor should read "root@computername:~#" in the Terminal, instead of the usual "username@computername:~$."
    • When typing a password, a Linux terminal won't display any characters or asterisks. Instead, it will appear blank.
  7. Then prompts you to enter a new password for the root user login.
  8. This is the password that will be used to log in to the root account.
  9. Make sure you enter the password exactly like you did the first time. This confirms the new root password. If successful, you should see a prompt telling you the password was updated successfully.
  10. To do so, click the icon that resembles a circle with an arrow pointing right. It's in the upper-right corner. From there you can either click Log Out or Switch User .
  11. To do so, type "root" in the username field on the login screen. Then type the password you set for the root account and click Log In or press Enter . This logs you in to the root account. [4]
  12. You can verify that you are logged in as a root user by opening the Terminal. It should say "root@computername:~#" by the text cursor by default. You can now access all root commands in the Terminal.
  13. Advertisement

Expert Q&A

Search
Add New Question
  • Question
    How can I change the root password in Kali Linux?
    Blain Gunter
    Computer Repair Specialist
    Blain Gunter is a Computer Repair Specialist and small business owner based in Bakersfield, California. He was first introduced to computers at the age of five and has over twenty years of experience in his field. He is both an IT consultant and computer repair technician and takes pride in his ability to troubleshoot anything. He works with hardware, software, Windows, macOS, GNU/Linux, and even vintage electronics.
    Computer Repair Specialist
    Expert Answer
    To reset the root password in Kali Linux, you would typically use the command line "passwd root" before rebooting. After executing the command, you'll be prompted to enter and confirm the new password twice, but note that the terminal won't display the password as you type it for security reasons. Given that Kali Linux is designed for security forensics and auditing, the method for resetting the root password may be different or slightly more involved than other operating systems. Always refer to the official documentation or user guides for accurate and secure procedures.
Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      Warnings

      • Use caution when logged in as a root user. There is nothing to stop you from accidentally deleting a critical system file, or executing a critical command that causes permanent damage to your system.
      Advertisement

      Expert Interview

      Thanks for reading our article! If you’d like to learn more about troubleshooting computers and printers, check out our in-depth interview with Blain Gunter .

      About This Article

      Thanks to all authors for creating a page that has been read 84,474 times.

      Is this article up to date?

      Advertisement