How to reset root password in Debian 11 Bullseye

Reset your forgotten root password for Debian 11 Bullseye server or desktop by resetting it. Here are the commands to follow for that. 

Forgotten passwords are always annoying – especially when it comes to your computer password. So you can no longer access your important data.

Among the numerous tasks that we have to carry out every day when managing Linux operating systems is resetting the password of the users, whether they are logged in or not, to regain access to the system and make it work properly. However, being an administrator you need root user access for that. But what happens if you forget the root password? In such conditions, you won’t be able to perform the core tasks of your computer. This problem often occurs because users use multiple passwords on multiple platforms. So, here is the solution to that.

Steps to reset forgotten root password on Debian 11

1. Open Debian 11 Grub menu

To reset the password, first, we have to access the Grub menu of our Debian 11 Bullseye. Restart your system and while doing that press and hold the Shift key on your Keyboard. This will drop you into the Grub menu of Debian 11.


2. Edit Gurb Menu to Reset the root password

The next step is to edit the default boot entry of your Debian 11. For that press the ‘e’ key on your keyboard. This will let you edit the Grub’s boot prompt. Don’t touch or delete anything here. Once you have the editor move to the next step.



3. Add rw init=/bin/bash

On the Grub editing screen, use your arrow key and move to the end of the line starting with “Linux“. There at end of this line type – rw init=/bin/bash, as shown in the given screenshot.

rw init=/bin/bash

After adding the given syntax, next, boot your system with this configuration. For that either use Ctrl+X or F10.

Edit Debian 11 Bullseye Grub menu


4. Debian 11 Root shell Access

Now, without providing any password you will have Debian 11’s shell with root access. Here, first, let’s check whether our user has read and write access to the file system where the OS has been installed.

For that use the command:

mount | grep -w /

If the output is:

(rw,realtime) then it means you have real-time-  read and write access to the file system.


5. Reset the root user password

Now, let’s change the password as we do normally on a Linux system using the command terminal.



The system will prompt you to add a new password two times:

Reset Root password in Debian 11 Buslleye

To change the password of some other user than root, we have to mention the username of the same. For example, if our system user name is Debian and we want to change the password of that then the command will be:


passwd username


passwd debian

Change Debian 11 user password


6. Reboot your system

Once you are done resetting your Linux password then restart your system to log in with the changed password. For rebooting, type:

exec /sbin/init

And that hit the Enter key.

From here onwards, you can log in and access your system with the newly set root password. This guide would be useful for those who somehow lose or forgot the root password and now want to change the same. The steps given in this article will also work for other Debian 11 versions as well.


Other Articles:

Install PowerShell on Debian 11 Bullseye Linux
Install phpBB forum on Debian 11 Bullseye
How to install Telegram on Debian 11 Bullseye
Forgot Your Linux Mint password- Here is a way to recover it.


5 thoughts on “How to reset root password in Debian 11 Bullseye”

  1. Hi,
    Before all – cheers fot this – ,
    second I believe in one typo:
    the (password, realtime) you mention is
    in fact (password, relatime).
    With a human’s cheers for standing with Humanity.

  2. If your going to install a linux os,write down your root passwd and put a copy of it on a desktop note,as well fir the users !
    Today,I read up on the xfs file system I used to install Debian 10.
    I wouldn’t recommend it if you want to have faster process time as it runs a lot of funky io in fake logical partitions and eats up cache memory and hard on cpu time!
    On boot my system says ” bad blocks ” so when I tried to fix with fsck,says use, “xfs” system,read up on it in ” man xfs”! Better explanation!
    I will use ext4 on next install!no funky logical partitions eating up ram and cache and cpu!


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.