How to Recover Root Password

  • : Function ereg() is deprecated in /home/sparxsys_linux/www.linuxindya.com/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/sparxsys_linux/www.linuxindya.com/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/sparxsys_linux/www.linuxindya.com/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/sparxsys_linux/www.linuxindya.com/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/sparxsys_linux/www.linuxindya.com/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/sparxsys_linux/www.linuxindya.com/includes/file.inc on line 647.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/sparxsys_linux/www.linuxindya.com/includes/unicode.inc on line 311.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/sparxsys_linux/www.linuxindya.com/includes/unicode.inc on line 311.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/sparxsys_linux/www.linuxindya.com/includes/unicode.inc on line 311.
  • : preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/sparxsys_linux/www.linuxindya.com/includes/unicode.inc on line 311.

As Linux geeks, we have a responsibility to set a good example and avoid easy passwords. However, if you have to change your password frequently, there's a chance that you'll forget it.

Single-User Mode

1. Boot your computer into single-user mode, which logs you in as the root user, without network connections or server services.
2. Linux mounts only the root filesystem (the / directory) in single-user mode, but you can mount other filesystems manually with the mount command if you need them.
3. Use the passwd command to reset the root password.

To boot your computer in single-user mode, you need to access the kernel command line from your Linux bootloader.