咨询Arch Linux默认用户名与密码,及VM登录报错问题
Arch Linux 默认用户名与密码说明
Hey there, let's break this down clearly:
- First off: Arch Linux has no pre-configured default regular user account, and there's no universal default
root/rootlogin combo either. - During the Arch installation process, you're explicitly required to set a custom password for the
rootuser—it's a mandatory step the installer won't let you skip. The reason you're getting a login error withroot/rootis almost certainly because you set a different password during setup and forgot it. - If you can't recall your root password, here's how to reset it using the Arch installation media:
- Boot your VM from the Arch Linux installation ISO again to enter the live environment.
- Mount your system's root partition to
/mnt—for example, if your root partition is/dev/sda2, runmount /dev/sda2 /mnt(adjust the device path to match your VM's setup). - Enter the chroot environment with
arch-chroot /mnt. - Run
passwd rootand follow the prompts to set a new root password. - Type
exitto leave the chroot, then reboot your VM—you'll now be able to log in with the new password.
Once you're logged in as root, you'll probably want to create a regular user account for daily use. You can do that with:
useradd -m -G wheel your_username(replaceyour_usernamewith your preferred name)passwd your_usernameto set the user's password- Then run
visudoand uncomment the line%wheel ALL=(ALL:ALL) ALLto give the user sudo privileges.
内容的提问来源于stack exchange,提问作者arunkumar sambu
相关产品推荐
相关产品推荐

