Article

Table of Contents
Theme:
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles.

Reset the Root Password on Arch Linux

Last Updated: Tue, Feb 22, 2022
Arch FAQ

Introduction

If you are locked out of your Arch Linux instance and have lost access to the root account, you need to boot into single-user mode and reset the root password.

How to Reset the Root Password on Arch Linux

  1. Click the Server Restart icon in the Vultr customer portal.

    Server Restart

  2. Open the web console.

    Vultr Web Console

    You can also reboot the server from inside the web console. See the Web Console FAQ for more information.

  3. As the system boots, press ESC to bring up the GRUB boot prompt. The prompt happens early in the boot process. If you miss the prompt, you need to restart the server from the control panel and try again.

  4. At the GRUB boot prompt, press E to edit the first boot option.
  5. Find the kernel line starting with linux /boot/.
  6. Add a space and the text init=/bin/bash to the end of the line.
  7. Press CTRL+X or F10 to boot into single-user mode.
  8. The system will boot, and you will see the root prompt.
  9. Run clear if your prompt is obscured with console text.
  10. Run mount -o remount,rw / to mount the system volume.
  11. Run passwd and follow the prompts to change the root password.
  12. Reboot the server.

    # exec /sbin/init
    

Want to contribute?

You could earn up to $600 by adding new articles.

La versión española del presente sitio web es una traducción realizada únicamente con fines informativos, y la versión inglesa prevalecerá.