Change/reset root password on raspberry pi

If you need to change/reset the root password on raspberry pi os (like after first boot), run this command

sudo passwd root

in your terminal. It will allow you to change the root password. You can then logout from the normal user, and log in as root user using the password you would have set while runninghte commnad listed above.

Be careful while using the root login on Raspberry Pi OS, or for that matter any Linux (or similar) OS, as it can lead to bricking your Pi.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s