-
Check for internet connection:
ping -c 3 archlinux.org
- if on wifi, use:
iwctl
to setup internet
-
System clock:
timedatectl set-ntp true
-
Partition disks following this general layout (for EFI systems):
Partition Size Type /dev/sda1 600 MB EFI System Partition /dev/sda2 Entire Disk Linux Filesystem -
Format the newly created partitions and set up swap for use:
mkfs.ext4 /dev/sda2
mkfs.fat -F32 /dev/sda1
-
Mount necessary partitions, create boot dir:
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
-
Install essential packages needed for minimal install (if on AMD system, exchange 'intel-ucode' for 'amd-ucode'):
pacstrap /mnt base base-devel linux linux-firmware linux-headers dhcpcd intel-ucode sudo nano htop git terminator neofetch
-
Generate content for fstab file at
/mnt/etc/fstab
:genfstab -U /mnt >> /mnt/etc/fstab
-
Change root into the new system:
arch-chroot /mnt
-
Set time zone:
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
-
Set hardware clock from the system clock to update
/etc/adjtime
:hwclock --systohc
-
Add (or just use nano to un-comment existing) en_US to
/etc/locale.gen
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
-
Create the file
locale.conf
, add the LANG variable to it:echo "LANG=en_US.UTF-8" >> /etc/locale.conf
-
Set the system hostname (eg: MYHOSTNAME):
echo "MYHOSTNAME" >> /etc/hostname
-
Open the
/etc/hosts
file, and make it look like this:127.0.0.1 localhost ::1 localhost 127.0.1.1 MYHOSTNAME
-
Set the root user's password:
passwd
-
Create a non-root user (eg: 'USER'), and set it up:
useradd MYUSER
groupadd sudo
usermod -aG sudo MYUSER
echo "MYUSER ALL=(ALL) ALL" >> /etc/sudoers
mkhomedir_helper MYUSER
passwd MYUSER
-
Install the systemd-boot bootloader:
bootctl install
-
Create the file
/boot/loader/entries/arch.conf
, and make it look like this:title Arch Linux linux /vmlinuz-linux initrd /intel-ucode.img initrd /initramfs-linux.img options root=UUID=57fb01ee-ed7a-41c3-a18e-286842b65d94 rw
the UUID can be added to this file more easily by running:
blkid /dev/sda2 >> /boot/loader/entries/arch.conf;
-
Create the file
/boot/loader/loader.conf
and make it look like this:default arch.conf timeout 3 console-mode max editor no
-
Verify boot options:
bootctl list
-
(optional) if using wifi, install iwd to use wifi after installing, enable service:
pacman -S iwd
systemctl enable iwd
-
Start dhcpcd:
systemctl enable dhcpcd
-
Reboot, and hopefully boot into a nice fresh and clean OS. Exit chroot with CTRL-D, and:
reboot
-
Clone and install yay, an AUR helper:
cd /opt
sudo git clone https://aur.archlinux.org/yay.git
sudo chown -R MYUSER:users ./yay
cd yay && makepkg -si