How to Reset Forgotten Root Password in Arch Linux

It’s quite frustrating getting locked out of your system as the root user because you cannot recall your password. This usually happens in case you haven’t logged in as root for an extended period of time. But fret not. In this article, we walk you through a step-by-step process on how you can reset a forgotten root password in Arch Linux.

Keep Reading: How to Reset Forgotten Root Password in CentOS 8

Firstly, reboot or power on your Arch system. The first entry will be selected by default as shown below.

Arch Linux Grub Boot Menu
Arch Linux Grub Boot Menu

Interrupt the booting process by pressing ‘e’ on the keyboard to make changes to the boot entry.

In the next step, scroll down and locate a line that begins with:

linux          /boot/vmlinuz-linux

Using the arrow keys navigate to the end of this line which ends with quiet. Next, append the parameter init =/bin/bash as shown.

Change Grub Boot Entry in Arch Linux
Change Grub Boot Entry in Arch Linux

Next press the ctrl + x combination to boot into single-user mode with the root filesystem mounted with read-only (ro) access rights.

We need to remount the root filesystem with read and write rights.

# mount -n -o remount,rw /
Mount Root Filesystem in Arch Linux
Mount Root Filesystem in Arch Linux

Now you can go ahead to reset the root password using the passwd command.

# passwd
Reset Root Password in Arch Linux
Reset Root Password in Arch Linux

Specify your new root password and confirm it. If everything went well you will get the output:

‘password updated successfully’.

Finally, run the command below to save the changes and start ArchLinux.

# exec /sbin/init

And that’s it! As you can see, it’s a simple and straightforward procedure. You should now be comfortable resetting your root password in case you forget it.

If this article helped, with someone on your team.

TecMint Weekly Newsletter
Get the Learn Linux 7 Days Crash Course free when you join 34,000+ Linux professionals reading every Thursday.
Check your email for a magic link to get started.
Something went wrong. Please try again.
TecMint has been free for 14 years. Help keep it that way.
Google AI Overviews and tools like ChatGPT have cut into search traffic for independent tech sites like TecMint. Running this site costs over $2,000 every month for hosting, infrastructure, and paying authors to keep the content accurate and tested.

If this article helped you solve a problem, consider buying a coffee. It helps keep TecMint free, supports the authors, and keeps the project going.
☕ Buy Me a Coffee
James Kiarie
This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

3 Comments

Leave a Reply
      • @Flajimir,

        I’m sorry to hear that you’re experiencing a similar issue with Arch Linux. If you’re unable to type anything after logging in, it could be caused by various factors you need to check such as keyboard connection, software conflicts, etc…

        Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.

Free Course
Get a free Linux course before you go.
Subscribe to TecMint Weekly and get the Learn Linux 7 Days Crash Course free. Read by 34,000+ Linux professionals every Thursday.
Something went wrong. Please try again.
Check your email for a magic link to get started.