Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
How To Reset The Root Password On Ubuntu If Forgotten (Linux)
Play lesson

Ubuntu Linux Tutorials for Beginners - How To Reset The Root Password On Ubuntu If Forgotten (Linux)

Master Ubuntu Linux: From VirtualBox Setup to Advanced Commands – Unlock the Power of Linux with Expert Tutorials!

4.0 (2)
24 learners

What you'll learn

Install Linux Ubuntu using Oracle VirtualBox on Windows systems
Install essential software and tools on Ubuntu Linux
Conduct basic operations using the Linux terminal
Utilize VirtualBox for running and managing virtual machines on Ubuntu

This course includes

  • 71 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

If you have forgotten the root password on Ubuntu 22.04 and need to reset it, you can follow these steps: 1. Start by rebooting your Ubuntu system. When the GRUB bootloader menu appears, select the default Ubuntu entry, but do not press Enter. Instead, press the 'e' key to edit the boot options. 2. In the boot options, locate the line that starts with `linux`. At the end of this line, append `init=/bin/bash` to specify that you want to start a bash shell as the init process. 3. Press `Ctrl + X` or `F10` to boot into the modified boot options. This will start a bash shell with root privileges. 4. Once the bash shell is loaded, you will be at a root prompt (`#`). Enter the following command to remount the root filesystem in read/write mode: ``` mount -o remount,rw / ``` 5. Now, you can reset the root password by entering the following command: ``` passwd root ``` You will be prompted to enter a new password for the root user. Enter the password and confirm it. 6. After successfully resetting the root password, remount the root filesystem in read-only mode using the following command: ``` mount -o remount,ro / ``` 7. Finally, reboot your system by entering the following command: ``` reboot ``` Upon reboot, you will be able to log in as the root user using the new password you set. Please note that resetting the root password should be done with caution and only when necessary. Make sure to keep your root password secure and remember it to avoid any potential security risks. #Ubuntu #RootPassword #PasswordReset #SystemAdministration #Linux

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere