Page cover image

Change user password

Changing the root user's password is an essential task for system security or recovery. Here's a step-by-step guide depending on whether you can log in as root, access through a sudo-enabled account,


If you're already logged in as the root user or can switch to it, follow these steps:

Steps:

  1. Open a terminal.

  2. Run the following command:

    passwd
  3. You will be prompted to enter a new password. Enter it, then confirm by typing it again.

  4. After confirming, the root password will be changed.

Last updated

Was this helpful?