How to Change the Root Password in Kali Linux (2026 Guide for Terminal, Recovery Mode, and More)

AI Overview Summary

To change the root password in Kali Linux, open a terminal, runsudo passwd root, then type your current sudo password once and your new root password twice. If you are locked out entirely, boot into GRUB recovery mode, mount the filesystem as writable, and run passwd root from there. Kali switched away from a default root login back in 2020.1, so most modern installs use a standard kali account with sudo rights instead of a built in superuser.

Key Points

  • Kali Linux has not shipped with a default root login since version 2020.1. The default account is now kali with password kali.
  • Use sudo passwd root from a normal terminal to set or change the root password on any current installation.
  • If root is locked (the usual state on fresh installs), sudo passwd root also unlocks it automatically.
  • Forgot your password completely? Use GRUB recovery mode and run passwd from the root shell, no login required.
  • Termux is an Android terminal app, not Kali Linux, so its password reset process is different and is covered separately below.
  • Always change default credentials immediately after installation. It is one of the simplest security steps you can take.

Why This Actually Matters

Kali Linux is the default toolkit for a huge share of penetration testers, security students, and hobbyists learning ethical hacking. In practice, most people run into password confusion because Kali’s setup has changed more than once over the years. Older tutorials still tell you to log in as root with the password toor, which has not been accurate for any modern release.

What most articles miss is that “changing the root password” and “getting root access” are two different questions with two different commands. This guide walks through both, plus what to do if you are locked out entirely, how usernames fit into the picture, and how the process differs on a fresh install, a live USB, and inside Termux on your phone.

Kali Linux Default Username and Password in 2025

The default username and password for Kali Linux since version 2020.1 is kali and kali. There is no separate root login by default, and the root account itself is locked until you manually set a password for it.

Before 2020.1, Kali shipped with root as the only account, using the well-known password toor (root spelled backward). Kali’s own documentation confirms this. The Kali team moved to a standard, non-privileged user model to match how other Linux distributions handle permissions, and because several tools, including Chromium-based browsers, simply refuse to run as root. When you actually use this setup, you log in as kali, then use sudo for anything that needs elevated privileges.

How to Change Root Password in Kali Linux Using Terminal

Open a terminal, runsudo passwd root, enter your current password once for sudo, then type the new root password twice. This single command sets a fresh root password and unlocks the account at the same time.

Here is what happens step by step:

  1. Open a terminal window.
  2. Type sudo passwd root and press Enter.
  3. Enter the password for your logged in account (the kali user by default).
  4. When prompted for a new UNIX password, type the new root password.
  5. Retype it to confirm.

After testing this across several fresh Kali installs, the process is identical whether you are on VirtualBox, VMware, or bare metal. The passwd command changes the encrypted password entry stored in /etc/shadow, and running it with sudo gives you the permission to modify an account other than your own.

How to Get Root Access in Kali Linux Terminal

Use sudo su or sudo -i to switch into a full root shell using your current account’s sudo password. You do not need root’s own password to do this, only your logged-in user’s credentials.

This is the part that trips people up most often. Getting root access and changing root’s password are separate actions. sudo su temporarily elevates your session to root privileges using your own account password, not root’s. Once inside, your terminal prompt typically changes to a # symbol instead of$, the traditional Linux signal that you are now operating as the superuser.

Sudo Password for Kali: What It Actually Is

The sudo password in Kali is simply the password of your currently logged-in user account, by default kali. It is not a separate password, and it is not the root password unless you have specifically configured them to match.

Sudo (superuser do) checks the password of the account requesting elevated access, not the account it is elevating to. Because of this, if you reset your kali user’s login password, that same new password is what sudo asks for going forward. This distinction matters because plenty of confused search queries assume sudo has its own separate credential system, when it actually mirrors whichever account is asking.

How to Reset Kali Linux Password if You Forgot It Completely

Reboot into GRUB, edit the boot entry to add init=/bin/bash (or use recovery mode), then run passwd from the resulting root shell to set a brand new password without needing the old one.

Here is the process:

  1. Restart the machine and hold Shift or Esc to reach the GRUB menu.
  2. Select the Kali entry and press e to edit it.
  3. Find the line starting with linux and add init=/bin/bash at the end.
  4. Press Ctrl+X or F10 to boot with that change.
  5. Run mount -o remount,rw / to make the filesystem writable.
  6. Run passwd kali (or passwd root) and set your new password.
  7. Reboot normally.

This method works because the bootloader bypasses the normal login process entirely and drops you straight into a shell with root-level access. Anyone with physical access to an unencrypted disk can do this, which is exactly why full disk encryption matters for any machine running sensitive tools.

How to Reset Kali Linux Password in Termux

Termux on Android is not Kali Linux itself; it is a terminal emulator that some people use to run Kali tools or a Kali chroot. Password resets inside Termux depend on how Kali was installed there, usually through passwd inside the chroot environment, or by reinstalling the chroot if credentials are lost.

This is a common point of confusion because a lot of people run a Kali environment inside Termux on their phone rather than installing Kali as a full operating system. If you set a password using passwd inside the Kali chroot, you reset it the same way, by running passwd again from inside that environment. If you cannot get back in at all, the more reliable fix is usually removing and reinstalling the chroot folder, since Termux does not offer the GRUB level recovery options a real installation does.

How to Change Root Username and Password in Kali Linux

The root account’s username cannot be renamed since “root” is a fixed system identity in Linux, but you can rename your regular user account with usermod -l newname oldname and change its password separately with passwd.

What most people actually mean when they ask this is changing their personal account’s username and password, not root’s. Root will always be called root because the entire permission system, including scripts and configuration files across the OS, refers to UID 0 by that name. Renaming your own account is straightforward, and you can update the home directory path with usermod -d /home/newname -m newname if you want it to match.

Comparison of Password Change Methods

SituationCommand or MethodRequires Old Password
You are logged in and know your account passwordsudo passwd rootYes, your own
You want a root shell without changing anythingsudo su or sudo -iYes, your own
You forgot every password on the systemGRUB recovery with init=/bin/bashNo
You are running Kali inside Termuxpasswd inside the chrootYes, chroot’s own
You installed from a live USB without persistenceCredentials reset to kali/kali on every rebootNot applicable

A Word on Security Trade Offs

Changing your root password is good practice, but it is not a complete security strategy on its own. Root access controls are only one layer. Kali is frequently run in virtual machines or on isolated lab networks precisely because a misconfigured, internet facing Kali box with weak or default credentials is a genuinely attractive target. According to Kali’s official documentation on default credentials, the non root policy introduced in 2020.1 was designed to align Kali with standard Linux security practices rather than the old superuser only model. If you run Kali on hardware connected to a real network, pairing a strong unique password with disk encryption and a properly configured firewall gives you meaningfully better protection than the password change alone.

Frequently Asked Questions

What is the default root password for Kali Linux?

Kali has not used a default root password since version 2020.1. The default login is the kali user with passwordkali, and root itself starts out locked with no password set.

How do I change my root password in Kali Linux using the terminal?

Open a terminal and runsudo passwd root, enter your current account password, then type the new root password twice to confirm it.

How can I get root access in the Kali Linux terminal?

Run sudo su or sudo -i using your regular account’s password. This opens a root shell without requiring a separate root password.

What is the sudo password for Kali Linux?

The sudo password is the password of whichever user account is currently logged in, by default, the kali account, not a separate root credential.

How do I reset my Kali Linux password if I forgot it?

Reboot into the GRUB menu, edit the boot line to add init=/bin/bash, remount the filesystem as writable, then run passwd to set a new password without needing the old one.

Can I change the root username in Kali Linux?

No, the root account name is a fixed part of the Linux permission system and cannot be renamed. You can rename your own personal user account instead using usermod -l.

How do I change my username and password in Kali Linux?

Use usermod -l newname oldname to rename your account and passwd newname to set a new password for it afterward.

Is toor still the default root password in Kali Linux?

No. Toor was the default root password only before version 2020.1. Every current release uses the kali/kali credential pair for the standard account instead.

Why is my root account locked in Kali Linux?

Root ships locked by default for security reasons. Running sudo passwd root both sets a password and unlocks the account in a single step.

How do I reset a Kali Linux password inside Termux?

Run passwd from inside the Kali chroot environment in Termux. If access is completely lost, reinstalling the chroot is usually faster than attempting a recovery process.

Does changing the root password affect my sudo password too?

No. Sudo authenticates using your own account’s password, so changing root’s password separately does not change what sudo asks you for.

What happens if I use a live USB instead of a persistent install?

Any password changes are lost on reboot unless persistence is enabled, and the system reverts to the default kali/kali credentials each time it starts.

How do I change a root password in Linux generally, not just Kali?

On most Linux distributions, running sudo passwd root as a privileged user follows the same pattern, though some distributions use different default account setups.

Why did Kali remove the default root login?

Kali moved to a non-root default in 2020.1 to align with standard Linux security practices and because several applications, including Chromium-based browsers, do not function properly when run as root.

Is it safe to keep using the root account regularly in Kali Linux?

It works, but the Kali team does not encourage it as a daily habit, since running everything as root increases the damage a mistake or compromised tool could cause.

Final Thoughts

Changing your root password in Kali Linux comes down to one command in almost every normal situation, sudo passwd rootwith GRUB recovery mode as your fallback if you are locked out completely. According to Kali’s official documentation, the shift to a standard user model back in 2020.1 is the main reason this trips people up, since so many older guides still reference outdated root and toor-style logins.

Take a minute after any fresh install to set a strong root password and confirm your sudo account is locked down properly. It is a small step that closes one of the easiest entry points an attacker could otherwise use, and it means you will not be caught off guard the next time you need admin-level access in a hurry.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *