Have you ever forgotten the password to a system, such as a virtual machine or a backup computer? If you’re wondering how to reset the root password in Kali Linux, this step-by-step guide will help you do it quickly and safely.
The first step is to restart the system. The GRUB screen will appear right after this process finishes, as shown in the image below. Next, we need to quickly press the “E” key to interrupt the boot process.

When we press the letter “E,” we’ll enter the page for editing the operating system parameters. Now, we need to look for the line that starts with the word “Linux.” Using the keyboard, navigate to the part that contains the entry “ro quiet splash.”

Now change the entry “ro” (read-only) to “rw” (read and write), and at the end of the “quiet splash” part, add “init=/bin/bash,” as shown in the attached image. Adding “init=/bin/bash” allows us to launch the Bash shell instead of the standard initialization process. This gives us access to the command line without needing to log in, enabling us to directly enter commands such as changing the root password.

To save and apply these changes, use CTRL+X or F10.
After the system boots, you will have access to the console with the root account already logged in.
This method is one of the most effective ways to reset the root password in Kali Linux without reinstalling the system or losing data
At this point, simply type the command: “passwd“
passwd
Now you need to enter the new password twice. After entering it correctly, you’ll see a message confirming that the password has been successfully changed.

Once all the necessary changes have been made, use the command: reboot -f
to restart the system.
Done! You can log in using your new password.
For more details about the system, visit the official Kali Linux website.
You may also find our article on Installing Kali Linux in VirtualBox helpful if you’re setting up a lab environment.