Skip to content

A quick guide for installing Arch Linux

Notifications You must be signed in to change notification settings

drrlvn/arch-installation-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 

Repository files navigation

Arch Linux installation guide

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.

Assumptions

  1. You want to use the entire disk for Arch Linux without dual-booting another operating system.
  2. You use either a physical or a virtual x86 64 bit machine which is capable booting in EFI mode. Note that if you use a virtual machine then you'll probably have to check the EFI option somewhere.
  3. You use an Intel CPU.
  4. Your desired root filesystem is XFS.

The steps

  1. Disable "Secure Boot" in the BIOS.
  2. 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. You can use blkid to list block devices.
  3. If you're using Wifi, launch wifi-menu. You're network should be automatically configured if you're using wired network.
  4. Optional - You can launch an SSH server and continue your installation remotely from another computer. In order to do that:
    1. Set a root password using passwd
    2. Start the SSH server using systemctl start sshd
    3. Figure out your IP using ip a
    4. SSH to your installation disk from another computer and continue the installation as usual.
  5. Partition your disk:
    1. Run cfdisk for partitioning
    2. Choose GPT partitioning (if you don't get the option to choose ,please run cfdisk -z)
    3. Create a 512MiB partition. Set its type to EFI System
    4. Create a swap partition. 4GiB will probably do. Set its type to Linux Swap
    5. Create a partition for the rest of the drive. (that should create /dev/sda3)
    6. mkswap /dev/sda2
    7. swapon /dev/sda2
    8. mkfs.vfat -F32 /dev/sda1
    9. mkfs.xfs /dev/sda3
    10. mount /dev/sda3 /mnt
    11. mkdir /mnt/boot
    12. mount /dev/sda1 /mnt/boot
  6. pacstrap /mnt base intel-ucode sudo linux linux-firmware xfsprogs neovim
  7. genfstab -U /mnt >> /mnt/etc/fstab
  8. arch-chroot /mnt
  9. ln -sf /usr/share/zoneinfo/Region/City /etc/localtime (you can see all the options in wiki timezones list)
  10. Uncomment en_US.UTF-8and other needed localizations in /etc/locale.gen
  11. locale-gen
  12. Edit /etc/locale.conf and write LANG=en_US.UTF-8
  13. Networking - Use NetworkManager
    1. pacman -S networkmanager
    2. systemctl enable NetworkManager
    3. Once you have a GUI environment set up - configure the network using the GUI
  14. echo [YOUR HOSTNAME] > /etc/hostname
  15. passwd - Set the root password
  16. useradd -m <your_username>
  17. usermod -G wheel -a <your_username>
  18. passwd <your_username> - Set the user password
  19. EDITOR=nvim visudo - Uncomment the line containing the wheel group
  20. Install the bootloader - systemd-boot
    1. bootctl --path=/boot install
    2. 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
      
    3. Edit /boot/loader/loader.conf:
      timeout  4
      default  arch
      
    4. Figure out your root partition's UUID By running blkid. This should probably be the UUID of /dev/sda3
    5. Create /boot/loader/entries/arch.conf. Replace <PUUID> (NOT <UUID>) with the PARTUUID that you got from running blkid. Note that the UUID is case sensitive.
      title          Arch Linux
      linux          /vmlinuz-linux
      initrd         /intel-ucode.img
      initrd         /initramfs-linux.img
      options        root=PARTUUID=<PUUID> rw
      
  21. Leave chroot - exit
  22. If this is a server installation you might want to enable SSH before rebooting. See the instructions at the bottom.
  23. Reboot - systemctl reboot
  24. Once your system is up activate NTP by running timedatectl set-ntp on
  25. If needed, connect to wifi by running nmcli device wifi connect <SSID> password <password>

Extras

Yay

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.

  1. sudo pacman -S --needed base-devel git
  2. cd /tmp
  3. git clone https://aur.archlinux.org/yay-bin.git && cd yay-bin && makepkg -i && cd - && rm -rf yay-bin

GNOME

pacman -S gnome && systemctl enable --now gdm

KDE

pacman -S sddm plasma-meta kdebase-meta kdeutils-meta kdegraphics-meta && systemctl enable --now sddm

Setting up an SSH server

pacman -S openssh && systemctl enable --now sshd.socket

About

A quick guide for installing Arch Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published