Changing the root password in Ubuntu just involves a few lines of code in the terminal.
Just like on Windows 11 and macOS, changing passwords on a great Linux distro like Ubuntu is good practice. When you change your password every so often, it’s harder for attackers to gain access to your system since your password will be less predictable. In the case of the root user on Ubuntu, which has ultimate access to all user accounts and changes all kinds of settings, this is especially important since the root user can change any password on your system.
How to change the root password in Ubuntu
To change the root password in Ubuntu, you’ll need to enable the root account first. Luckily, changing the root password actually enables it, so that’s not a worry. As always, this is done with the terminal.
- Open a terminal session with Ctrl, Alt, and T.
- Type the command sudo passwd root
- Enter the password for your account.
- Enter a new password to be used for the root user. It has to be eight characters and complex.
- If you want to disable the root account again, just type the command sudo passwd -l root.
That’s it. You’ve changed the root password in Ubuntu. Keep in mind, that you won’t see the password as you type it into the terminal. This is a security feature by design, so someone looking at your screen won’t see what you’ve inputted.
One great practice on Ubuntu
Though changing passwords is good practice on Ubuntu, it’s also a good idea to try out different apps, too. If you’re coming from another operating system like Windows or macOS, there are a lot of different alternatives to try things like Microsoft Office, Adobe Photoshop, and even a video editor like iMovie. If you’re a developer, there are also great apps like VS Code.
** (Disclaimer: This video content is intended for educational and informational purposes only) **
More...