How to change root password on Alpine Linux

The root password on an Alpine Linux system can be changed using the “passwd” command. Here’s how to do it:

  1. Open a terminal window.
  2. Log in as root or switch to the root user using the “su” command:
su
  1. Run the following command to change the root password:
passwd
  1. Follow the prompts to set the new root password.
  2. Once you’ve successfully changed the password, log out and log back in as root to confirm that the new password works.

Note: It’s important to choose a strong and secure password to protect your system against unauthorized access. It’s also recommended to regularly change your passwords to keep your system secure.

Leave a Comment