So you want to install Arch Linux but got lost in the Wiki. This is a quick guide for installing a basic system. It is far from being feature-complete, as it makes some basic assumptions.
- You want to use the entire disk for Arch Linux without dual-booting another operating system.
- You use either a physical or a virtual x86 64 bit machine which is capable booting in either BIOS or EFI mode.
- You use an Intel CPU.
- Your desired root filesystem is BTRFS.
- Boot into Arch Linux live installation media. Make sure that you know which disk is used for your
installation. We'll assume it's
/dev/sda. - If you're using Wifi, launch
wifi-menu. You're network should be automatically configured if you're using wired network. - Optional - You can launch an SSH server and continue your installation remotely from another
computer. In order to do that:
- Set a root password using
passwd - Start the SSH server using
systemctl start sshd - Figure out your IP using
ip a - SSH to your installation disk from another computer and continue the installation as usual.
- Set a root password using
- Partition your disk:
- BIOS - Just
mkfs.btrfs /dev/sdathe entire disk and thenmount /dev/sda /mnt - EFI - Use
cfdiskfor partitioning:- Choose GPT partitioning
- Create a 512MiB partition. Set its type to
EFI System - Create a partition for the rest of the drive.
mkfs.vfat -F32 /dev/sda1mkfs.btrfs /dev/sda2mount /dev/sda2 /mntmkdir /mnt/bootmount /dev/sda1 /mnt/boot
- BIOS - Just
pacstrap /mnt base intel-ucode sudo btrfs-progsgenfstab -U /mnt >> /mnt/etc/fstabarch-chroot /mntln -sf /usr/share/zoneinfo/Region/City /etc/localtime- Uncomment
en_US.UTF-8and other needed localizations in/etc/locale.gen locale-gen- Edit
/etc/locale.confand writeLANG=en_US.UTF-8 - Networking
- Laptop - Use NetworkManager
pacman -S networkmanagersystemctl enable NetworkManager- Once you have a GUI environment set up - configure the network using the GUI
- PC/VM - Use systemd-networkd
systemctl enable systemd-{network,resolve}d- Use
ip linkto determine the name of your network interface - Edit
/etc/systemd/network/dhcp.network:
[Match] Name=en* [Network] DHCP=ipv4 Domains=extra.domains.that.you.need.example.com [DHCP] UseDomains=yesrm /etc/resolv.conf ; ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
- Laptop - Use NetworkManager
echo hostname > /etc/hostnamepasswd- Set the root passworduseradd -m your_usernameusermod -G wheel -a your_usernamevisudo- Comment out the line containing thewheelgroup- Install the bootloader
- BIOS - GRUB
pacman -S grubgrub-install --target=i386-pc /dev/sdagrub-mkconfig -o /boot/grub/grub.cfg
- EFI - systemd-boot
bootctl --path=/boot install- Edit
/etc/pacman.d/hooks/systemd-boot.hook:[Trigger] Type = Package Operation = Upgrade Target = systemd [Action] Description = Updating systemd-boot... When = PostTransaction Exec = /usr/bin/bootctl update - Edit
/boot/loader/loader.conf:default arch timeout 4 - Figure out your root UUID By running
blkid - Create
/boot/loader/entries/arch.conftitle Arch Linux linux /vmlinuz-linux initrd /intel-ucode.img initrd /initramfs-linux.img options root=PARTUUID=THE-UUID-YOU-FOUND-OUT rw
- BIOS - GRUB
- Leave chroot -
exit - If this is a server installation you might want to enable SSH before rebooting. See the instructions at the bottom.
- Reboot -
systemctl reboot
pacman -S gnome && systemctl enable --now gdm
pacman -S openssh && systemctl enable --now sshd.socket
Building packages from AUR isn't possible to do as root. In order to install Yay you have to configure sudo and run these commands as a regular user.
sudo pacman -S --needed base-devel gitcd /tmpgit clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -i && cd - && rm -rf yay-bin