How to Change the Root Password in Linux
Press Ctrl+Alt+T to open a terminal window.As long as you know the current root password, you can change it right from the desktop., Type su at the command prompt, then hit ↵ Enter.A new line will open beneath the command prompt that says...
Step-by-Step Guide
-
Step 1: Press Ctrl+Alt+T to open a terminal window.As long as you know the current root password
This keyboard shortcut will open a new terminal window with a command prompt in all Linux desktop environments.
If you don’t have the current root password, see this method.
If you’re not using a desktop environment, you’re already at a command prompt, so just continue to the next step. -
Step 2: you can change it right from the desktop.
, When the password is accepted, you’ll be brought back to the command prompt as the root user.
If you type the password incorrectly, just run su again and retry.
Passwords are case-sensitive. , A new line will open beneath the command that says, “Enter new UNIX password:” , The password you type will not appear on the screen, but you’ll be prompted to type it a second time to confirm. , You will see a message that says “password updated successfully.” , This will log you out of the root account. -
Step 3: Type su at the command prompt
-
Step 4: then hit ↵ Enter.A new line will open beneath the command prompt that says “Password:”
-
Step 5: Type the current root password
-
Step 6: then press ↵ Enter.
-
Step 7: Type passwd
-
Step 8: then press ↵ Enter.
-
Step 9: Type a new password
-
Step 10: then press ↵ Enter.
-
Step 11: Retype the new password
-
Step 12: then press ↵ Enter.
-
Step 13: Type exit and then press ↵ Enter.
Detailed Guide
This keyboard shortcut will open a new terminal window with a command prompt in all Linux desktop environments.
If you don’t have the current root password, see this method.
If you’re not using a desktop environment, you’re already at a command prompt, so just continue to the next step.
, When the password is accepted, you’ll be brought back to the command prompt as the root user.
If you type the password incorrectly, just run su again and retry.
Passwords are case-sensitive. , A new line will open beneath the command that says, “Enter new UNIX password:” , The password you type will not appear on the screen, but you’ll be prompted to type it a second time to confirm. , You will see a message that says “password updated successfully.” , This will log you out of the root account.
About the Author
Sarah Cole
Committed to making pet care accessible and understandable for everyone.
Rate This Guide
How helpful was this guide? Click to rate: