How to change root password in Ubuntu

While Linux distributions are more secure than Windows, that doesn't mean you should throw caution to the wind when working on your Ubuntu PC. Just like with Windows 11 and macOS, it's good practice to change passwords on a Linux distribution. Changing your password from time to time makes your login credentials far less predictable, making it harder for hackers to compromise your system's security. It's especially important to update the root password frequently, as the account has full access to all user profiles and can change all sorts of settings.



How to change root password in Ubuntu

To change the root password in Ubuntu, you must first enable the root account. Fortunately, changing the root password actually enables it, so you don't have to worry about that. As always, this is done in the terminal.

  1. Open a terminal session with Ctrl, Alt and T.
  2. Enter the following command and press Input:
    sudo passwd root
  3. Enter the password for your account.
    A screenshot of the process of setting up a root account on Ubuntu

  4. Choose a new password for the root user. It must be at least eight characters long.
  5. If you want to disable the root account again, you can enter this command:
    sudo passwd -l root

That's it. You have changed the root password in Ubuntu. Remember that you will not see the password when you type it in the terminal. This is a security feature to prevent others from knowing your password when you type it in the terminal.


A great exercise under Ubuntu

Running GIMP on the Milk-V Jupiter

Although changing passwords on Ubuntu is a good practice, it's also a good idea to try out different apps. If you're coming from another operating system like Windows or macOS, there are many different alternatives to try things like Microsoft Office, Adobe Photoshop, and even a video editor like iMovie. If you're a developer, you might be interested in VS Code.



Leave a Comment