• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How to Change Root Password in Ubuntu 24.04 Using Terminal

How to Change Root Password in Ubuntu 24.04 Using Terminal

By Sourabh / July 26, 2024 Category: How To, Ubuntu

How to change root password in Ubuntu 24.04. Read this tutorial to find how to reset forgotten root password in Ubuntu Linux.

Regular User – Changing Root Password

To update or change the root password in Ubuntu 24.04 with sudo privileges, simply run the “passwd” command with the sudo privileges:

sudo passwd root

Root User – Changing Root Password

To change the password as a root user, first you will have to switch to the “Root User”. To do so, run the following command to log in as a root user:

sudo su -

Now run the passwd command to change the root password:

passwd

Once the root password is changed, exit from the root user – type exit in the terminal.

Resetting the Forgotten Root Password Using Recovery Mode

You can easily reset the forgotten root password from the recovery mode. Simply go through the following steps:

Step 1 : Boot into recovery mode and drop to root shell prompt. To do so, fresh start the system and while the machine is booting, press and hold the “ESC” key (press and hold the Shift key (for systems with BIOS) or the Esc key (for systems with UEFI)) from your keyboard to enter the GRUB menu. From there, select the “Advanced options for Ubuntu” using the arrow keys and hit the Enter key to proceed.
Step 2 : Now select the highlighted option and press Enter to boot the system into “recovery mode” and from the recovery menu, select the “Drop to Root Shell Prompt” option and press Enter. After this you will be asked to provide the root password for maintenance.
Step 3 : Enter the current root password and press Enter to log in as a root user.
Step 4 : Once you are logged into the root user, execute the following command to remount the root filesystem:

mount -rw -o remount /

Step 5 : Now run the passwd command to easily reset your forgotten root password:

passwd root

Once you are done, run the “exit” command to exit from the root shell prompt and go back to the recovery menu. From there, select the “Resume Normal Boot” option.

That’s all, now you shall be able to log in with the new root password.

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap