How To Reset Linux root Password

Below you can find the procedure to reset CentOS Redhat Fedora Debian Ubuntu AIX Kali VMWare and any other Linux root Password

Method 1 – Boot it in Lunux Single Mode

  1. While booting, On the Grub boot menu screen press ‘e’
  2. This will enable edit option in the grub menu .
  3. Go to the line which contains the word ‘kernel‘ and press ‘e’ to edit the line
  4. Go to end of that line and enter ‘linux single
  5. Then press ‘esc‘ twice and press ‘b‘ to boot the system in single mode.
  6. Now the system will boot in the single user mode.
  7. On the console type: passwd root
  8. Now enter your new root password.

Method 2 – Linux Rescue Mode

Please try out the following steps to change the root password
  1. Boot the computer with linux Installation CD.
  2. Select linux Rescue mode
  3. When the #sh prompt is reached, enter the following commands to change the mount point.
    #chroot /mnt/sysimage
  4. Now enter the following command to change the root password.
  5. Now enter your new password.


Leave a Reply

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

Comment moderation is enabled. Your comment may take some time to appear.