How to change root password in Ubuntu Linux

To change the root password in Ubuntu, follow these steps:

  1. Open a terminal window or switch to a TTY console.
  2. Type sudo passwd and press enter.
  3. Enter your current user password.
  4. Type the new root password and press enter.
  5. Re-enter the new root password to confirm.

The root password should now be changed.

Note: In Ubuntu, the root account is disabled by default for security reasons. It is recommended to use sudo to perform administrative tasks instead of logging in as root.

Leave a Comment