How to Recover Linux Root Password

If you forget your linux server or client machine root password. Don’t you worry about this! in this tutorial i will explain with steps how to recover linux root password and how you can reset it in simple way.

However, there are couple of methods to recover root password. So, lets go towards the easy and simple method I usually follow to recover my root user password in linux whenever I forget the password.

  • Save and close all your applications if you have opened already for safe data before reboot the machine.
  • Softly reboot your desktop client or server and wait for appearing a GRUB loader appearing.
  • When grub loader will be appeared, press “e” to edit into grub loader

GNU Grub
GNU Grub

  • Press arrow key and point to kernel line and then press “e” to edit into kernel

Kernel Grub
Kernel Grub

  • After that at the end of the kernel line and type “single” (without quotes) after give single space as shown below in the screenshot. and press “Enter” now.

Add Value in Kernel
Add Value in Kernel

  • Press “b” to boot after changes

Boot After Change
Boot After Change

  • Now you will get the root prompt without asking password

Root Prompt
Root Prompt

  • Reset the “root” password now.

Enable Root Password
Enable Root Password

Avatar photo

Asif Khan

Responsible and proactive professional with more than 13 years of experience in IT systems, open source software applications, DevOps, Linux systems, and cloud operations. My main goals are to automate things, keep them safe, and make sure they are strong. I am very good at planning and building the infrastructure for services that people really want. I was drawn to the fast-paced world of cloud computing because it has resources that can be scaled up or down as needed. One of my best skills is being able to use a lot of different DevOps tools to set up, release management, and microservices ecosystems, as well as for provisioning, orchestration, and configuration management.