The images can be found at https://www.archlinux.org/download/
The image can be flashed onto a USB with any software (like balenaEtcher or simply dd
) or burned to a CD/DVD.
Boot the image device (via BIOS preferrably as it is that bit easier to setup than UEFI and makes no difference otherwise)
fdisk -l
If the partitions are already as you'd like (as you're reinstalling your system), go to the next step and just reformat the partition/s you want wiped, ie. root partition, and move on to mounting (step 5)
-
fdisk /dev/sdb
- Remove existing partition/s (if you want)
o
if disk is blank to create a MBR partition table- Create a root partition
- If you need hibernation, create a swap partition. Otherwise, don't, and adjust the following partition numbers accordingly.
- Create a home partition
mkfs.ext4 /dev/sdb1
mkswap /dev/sdb2
(only if you want to create a swap/hibernation partition)swapon /dev/sdb2
(only if you created a swap/hibernation partition)mkfs.ext4 /dev/sdb3
mount /dev/sdb1 /mnt
mkdir /mnt/home
mount /dev/sdb3 /mnt/home
pacstrap /mnt base linux-lts linux-firmware nano amd-ucode
Swap amd-ucode for intel-ucode if you have a Intel CPU
Install ntfs-3g
when installing base packages if you have NTFS partitions you want available on first start
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Australia/Perth /etc/localtime
use timedatectl list-timezones
to find your timezone if you don't know it or it's format
hwclock --systohc
assumes hwclock is set in UTC
nano /etc/locale.gen
- Uncomment
en_US.UTF-8 UTF-8
,en_AU.UTF-8 UTF-8
,en_GB.UTF-8 UTF-8
locale-gen
nano /etc/locale.conf
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en_GB:en_US
This makes en_AU the default language and then falls back to en_GB and en_US in that order
echo <hostname> > /etc/hostname
- Edit /etc/hosts to contain same
127.0.0.1 localhost
::1 localhost
127.0.1.1 <hostname>.localdomain <hostname>
swap <hostname>
for your actual desired hostname
Only do the following to enable the networkd service if you're going to exclusively use a CLI. Enabling it and installing a GUI will cause problems when NetworkManager or WICD try to take over
systemctl enable systemd-networkd.service
pacman -S sudo
- In /etc/sudoers, uncomment
%wheel ALL=(ALL) ALL
useradd -m -g users -G wheel -s /bin/bash <username>
use -M if user exists in /home, else -m to create userdirpasswd <username>
pacman -S grub os-prober
(only installos-prober
if you have/want other OSes on your system)grub-install /dev/sdb
grub-mkconfig -o /boot/grub/grub.cfg
pacman -S pacman-contrib
curl -s "https://archlinux.org/mirrorlist/?country=AU&protocol=https&ip_version=6&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -
This selects the IPv6 capable HTTPS mirrors that are located in Australia, sorts them by download speed, and overwrites the /etc/pacman.d/mirrorlist file with the top 5 results
pacman -Syu
pacman -S xorg-server xfce4 network-manager-applet lightdm-gtk-greeter gvfs xf86-video-amdgpu pipewire-pulse wireplumber pavucontrol
swap xf86-video-amdgpu
for xf86-video-intel
or nvidia
as needed
xorg-server
is the display server, xfce4
is the desktop environment, network-manager-applet
is NetworkManager and it's applet for the DE, lightdm-gtk-greeter
is the login screen, gvfs
is for mounting and trash functionality in file managers, pipewire-pulse
is the next generation sound server replacement for and compatible with PulseAudio, wireplumber
Pipewire's session manager and pavucontrol
is a PulseAudio sound mixer (for GTK+ systems)
systemctl enable lightdm.service
systemctl enable NetworkManager.service
pacman -S xorg-server lxqt network-manager-applet networkmanager-qt sddm gvfs xf86-video-amdgpu pipewire-pulse wireplumber pavucontrol-qt
swap xf86-video-amdgpu
for xf86-video-intel
or nvidia
as needed
xorg-server
is the display server, lxqt
is the desktop environment, network-manager-applet
is NetworkManager and it's applet for the DE, sddm
is the login screen, gvfs
is for mounting and trash functionality in file managers, pipewire-pulse
is the next generation sound server replacement for and compatible with PulseAudio, wireplumber
Pipewire's session manager and pavucontrol-qt
is a PulseAudio sound mixer (for qt systems)
systemctl enable sddm.service
systemctl enable NetworkManager.service
nano /etc/pacman.conf
Uncomment
[multilib]
Include = /etc/pacman.d/mirrorlist
Once sudo is properly configured, full root access can be heavily restricted or denied without losing much usability. To disable root, but still allowing to use sudo, you can use:
passwd -l root
If you somehow don't value security, you can choose to leave root active, but for the love of God, set a very strong password for the safety of your system if you go down this path!
passwd
- Reboot to System (safely using these commands)
exit
to leave chroot- manually
umount -R /mnt
- then
reboot
sudo pacman -Sy --needed base-devel git go
cd /tmp
git clone https://aur.archlinux.org/yay.git && cd yay/
makepkg -si
CLI AUR helperyay
will now be ready to useyay -S pamac-aur
Only if proceeding to install a GUI and you want to use GUI software management, aspamac
is a GUI AUR helper!