Always refer to the Arch Install Guide.
This document shows only a few key commands that might not directly be in the Installation Guide.
Important: Always specify the full disk, not the partition!
sudo cp archlinux-2023.01.01-x86_64.iso /dev/sdaInstall the woeusb-ng package from the AUR.
This command runs a while, do not iterrupt it, even if it appears to be stuck.
sudo woeusb -v -d win_10_ltsc_2021.iso /dev/sdbEnsure your network interface is listed.
ip linkDHCP for ethernet connections is enabled by default, so just plug in the ethernet cable.
If you require a static IP you need to state the IP adress and the netmask.
ip address add 192.168.1.10/24 dev eth0Same applies to wireless interfaces (like wlan0).
If your wireless connection requires a static IP, follow the steps above.
To scan and connect to a wireless network, use the wifi-menu-command and follow the on-screen instructions.
If this does not work, you need to connect to the WIFI manually.
First, list all wireless devices.
iwctl device listWe assume, your wifi interface is wlan0.
Scan for available wireless networks (this will not output anything).
iwctl station wlan0 scanThen, list all available networks.
iwctl station wlan0 get-networksFinally connect to your desired network. Replace 'SSID' with the name of the network.
iwctl station wlan0 connect 'SSID'If a passphrase is required, you will be promptet to enter it. For dynamic IPs, run the DHCP daemon:
dhcpdAfterwards, you should be connected to the internet, check this with a ping.
If you still have no connection, check the resolve configuration.
vim /etc/resolv.confAdd the DNS server of your router or a public DNS server address.
nameserver 192.168.1.1
nameserver 1.1.1.1If you use BIOS, one root partition is enough, if you use UEFI, don't forget to create an EFI-partition first.
If you want to encrypt your disk, read on before creating any partitions.
Create all partitions but don't create any filesystems yet, as we need to encrypt the root partition first.
Load the cryptsetup kernel modules:
modprobe dm-crypt
modprobe md-modCreate 3 partitions: UEFI, boot and root (which will be encrypted) with fdisk.
There should be three partitions:
/dev/sda1- efi, 256 MB/dev/sda2- boot, 512 MB/dev/sda3- root, Rest of disk
Now we encrypt the root partition.
cryptsetup luksFormat -v -s 512 -h sha512 /dev/sda3
cryptsetup open /dev/sda3 luks_rootluks_root will be the name used to access the partition. Afterwards, the partition will be available at /dev/mapper/luks_root.
Now, create a filesystem with mkfs.ext4 /dev/mapper/luks_root.
Also create filesystems for the other 2 partitions.
/dev/sda1- efi, vfat/dev/sda2- boot, ext4
Finally, mount all partitions.
mount /dev/mapper/luks_root /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efiWhen not using disk encryption, only mount the root and efi partitions outside of chroot.
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
mount /dev/sda2 /mntpacstrap /mnt base base-devel linux linux-firmware linux-headers neovim man-db man-pagesReplace linux with linux-lts if you want to use the LTS-kernel.
pacman -S networkmanager grub intel-ucode efibootmgr gvfs udisks2 os-prober dosfstools ntfs-3g
systemctl enable NetworkManager.serviceIf you use BIOS instead of UEFI, you don't need the efibootmgr package. The last three packages are only relevant if you want to dual boot Windows. Replace intel-ucode with amd-ucode if you have an AMD processor.
This only applies when the root partition is encrypted with LUKS.
Before installing grub, add the following to /etc/default/grub
GRUB_CMDLINE_LINUX=”cryptdevice=/dev/sda3:luks_root”
GRUB_ENABLE_CRYPTODISK=yThen, add the encrypt keyword to the following line in /etc/mkinitcpio.conf
HOOKS=(base udev autodetect modconf block encrypt filesystems keyboard fsck)Afterwards, run mkinitcpio -p linux. Now you can install GRUB.
Install grub like this:
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi --recheck
grub-mkconfig -o /boot/grub/grub.cfgEdit the /etc/default/grub file.
DEFAULT_TIMEOUT=15
GRUB_CMDLINE_LINUX_DEFAULT="loglvel=3 quiet acpi_backlight=vendor"Finish the installation, exit chroot, unmount your partitions and reboot.
rEFInd works really well when dual-booting and has a very easy setup.
pacman -S refind
refind-installrEFInd should have created a config at /boot/refind_linux.conf. If not, run mkrlconf.
By default, rEFInd adjusts its config relative to the live chroot environment, which needs to be fixed before the first reboot.
Open the file in vim and make sure the standard options line contains the UUID of the root drive in rw mode.
You can get the UUDI by running blkid.
Load the ucode image before the initramfs image.
"Boot with standard options" "rw root=UUID=2f917bda-fbef-41ca-8cf5-e87eaf4fb94e add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\initramfs-linux.img"
"Boot to single-user mode" "rw root=UUID=2f917bda-fbef-41ca-8cf5-e87eaf4fb94e single"
"Boot with minimal options" "ro root=UUID=2f917bda-fbef-41ca-8cf5-e87eaf4fb94e"
Once successfull, you can still rEFInd with a theme.
Edit the sudoers-file at /etc/sudoers with neovim.
sudo EDITOR=nvim visudoUncomment the line that says %wheel ALL=(ALL) ALL.
Then, we add a new user called simon to the wheel group we just uncommented.
useradd -m -G wheel -s /bin/zsh simonAs a last step, the user needs a password:
passwd simonYay is an AUR wrpaper, that enables you to install and maintain packages from the AUR.
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -siSome services are really usefull for resource and disk management.
sudo pacman -S acpid ntp dbus avahi cupsThen, enable these services, so they get automatically started at boot.
systemctl enable acpid
systemctl enable ntpd
systemctl enable avahi-daemon
systemctl enable org.cups.cupsd.servicesudo pacman -S ufwStart and enable the ufw.service a minimalistic config can look like this:
sudo ufw default deny
sudo ufw limit ssh
sudo ufw enable # run once after installing ufw
sudo ufw status # verifysudo pacman -S alsa-utils pipewire pipewire-alsa wireplumberThis installs the pipewire sound server with the wireplumber client. Restart for changes to apply.
Install wayland and a compositor that can make use of the wayland protocol and some useful services.
sudo pacman -S wayland polkit waybar mako wl-clipboard xdg-desktop-portal, xdg-desktop-portal-wlr mesa kittyyay -S river rofi-lbonn-wayland wdisplaysEnables file browser support for Android phones (reboot for changes to take effect).
pacman -S mtpfs gvfs-mtp
yay -S jmtpfspac -S texlive-most # choose which packages to install
pac -S biber perl-clone
pip install Pygments # for syntax highlighting| Command | Action |
|---|---|
pacman -Sc |
removes the cache for uninstalled packages, alternatively use a hook |
pacman -Qdtq |
lists all unused packages |
pacman -Rnscd $(pacman -Qdtq) |
removes all unused packages |
| Command | Action |
|---|---|
du -sh ~/.cache |
shows the size of the cache folder |
rm -rf ~/.cache/* |
deletes everything from that folder |
Check for files and folders in ~/.config and ~/.local/share that are no longer needed.
Set a limit for journald with journalctl --vacuum-time=2weeks or journalctl --vacuum-size=50M or delete the logs manually.
To set a permanent limit, set SystemMaxUse=100M in /etc/systemd/journald.conf.