After installing Ubuntu, I suddenly realized I hadn’t set a root password. Without knowing the password, naturally I couldn’t access the root user. I searched online and here’s how it works. Ubuntu’s default root password is random — meaning a new root password is generated each time the system boots. We can open the terminal and enter the command sudo passwd, then enter the current user’s password, press enter. The terminal will prompt us to enter a new password and confirm it — this password then becomes the new root password. After the change is successful, enter the command su root, input the new password, and you’re all set.
How to Change the Default Root Password in Ubuntu
Related Posts
- DataX MySQL to ClickHouse Data Sync Example 2025-06-03
- How to Self-Host a RustDesk Server 2024-08-26
- How to Install Google Pinyin Input Method on Linux 2024-06-01
- How to Fix “Failed to Handler Mux Client Connection” 2024-01-13
- How to Sync Linux Server Time With Internet 2024-01-13
- How to Install the GPM PHP Extension 2022-12-04