-@ .##@ .####@ @#####@ . *######@ .##@o@#####@ /############@ /##############@ @######@**%######@ @######` %#####o @######@ ######% -@#######h ######@.` /#####h**`` `**%@####@ @H@*` `*%#@ *` `*
After seeing the i3 window manager in action on a very minimal disttribution, I knew it was my time to take the pilgrimage to Arch.
As a long time Linux fanatic I’d never really taken the time to understand what makes Arch different.
- The Arch Way
- Forces one to build the system up by hand.
- This encourages you to question each piece of the system.
- The result is a highly tailored and minimal system that meets precisely your needs.
- The Arch User Repository (AUR) is a treasure chest of pre-packaged useful recent software. Somehow every program I’ve ever needed has been available on AUR.
- Rolling upgrades.
- Practical and pragmatic documentation. The Arch Wiki is the gold standard when it comes to documentation.
To bootstrap the install process, a boot key is the way to go. Obtain the latest
iso image, and block write it to a USB drive using
dd (aka disk destroyer to some) trusts you know what you’re doing and can destroy data very easily if not used correctly.
lsblk to determine the mapped device name (e.g.
/dev/sdb). When ready, pull the trigger and flash the drive with arch:
dd if=Downloads/archlinux-2019.03.01-x86_64.iso of=/dev/sdb status="progress"
Boot the target system on the new boot drive. If all goes well, you will end up on a bash shell, in the temporary boot preparation system provided by Arch.
Get network connectivity:
wifi-menu ip a
timedatectl set-ntp true
UEFI (supports newer 64-bit based GPT) or BIOS (based on traditional MBR). If the below sys node doesn’t exist, go BIOS:
Determine the target block device (e.g. an SSD) for installation, using
Assuming a BIOS compatible system, will go with
gdisk) for the partitioning setup:
pprint partition table
In a nutshell, blow away any existing partitions (
d), and create 4 new (
n) primary partitions. Note when specifying the last sector can size with
+200M style syntax,
+200M is 200MiB,
+50G is 50GiB. I cut my ~500GB drive up into the following 4 partiions:
- 200M for boot partition (grub etc)
- 24G for swap (rule of thumb is 150% of total system memory)
- 100G for root partition
- ~340G+ for home partition (leave last sector unspecified in fdisk to use all remaining space)
We are aiming for a partition layout similar to this:
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 200M 0 part /boot ├─sda2 8:2 0 24G 0 part [SWAP] ├─sda3 8:3 0 100G 0 part / └─sda4 8:4 0 341.6G 0 part /home
Format partitions (file systems)
ext4 (the fourth extended filesystem) to the boot, root and home partitions (i.e. all but the swap):
mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/sda3 mkfs.ext4 /dev/sda4
Then setup the swap space:
mkswap /dev/sda2 swapon /dev/sda2
Now its time to mount these new partitions into the Arch bootstrapped system, so they be used.
The four partitions will be mounted into the current Arch boot preparation systems file system tree under
/mnt so a
chroot can occur, and then system installation. First mount the root partition, then the boot and home partitions within the root mount under
mount /dev/sda3 /mnt mkdir -p /mnt/boot /mnt/home mount /dev/sda1 /mnt/boot mount /dev/sda4 /mnt/home
Setup pacman mirrors
/etc/pacman.d/mirrorlist. Higher mirrors in the list taken precedence over lower once, rearrange as desired:
## ## Arch Linux repository mirrorlist ## Filtered by mirror score from mirror status page ## Generated on 2019-04-01 ## ## Australia Server = http://mirror.internode.on.net/pub/archlinux/$repo/os/$arch ## Turkey Server = http://mirror.veriteknik.net.tr/archlinux/$repo/os/$arch
Install Arch with pacstrap
pacstrap /mnt base base-devel
So that the mount are automatically applied as part of the system boot process, add them to
/etc/fstab as UUID’s, which are more robust than device names which can change.
genfstab -U /mnt >> /mnt/etc/fstab
Now to change root into the new system, from the Arch boot preparation system:
Set the password for the root account with
/etc/locale.gen, and generate:
Symlink in the appropriate zone definition:
ln -sf /usr/share/zoneinfo/Australia/Canberra /etc/localtime
hwclock --systohc to generate
/etc/hostname, and define a name for the host.
/etc/hostsfor loopback based on the defined hostname above,
127.0.1.1 myhostname.localdomain myhostname
- Install NetworkManager which provides persistent network configuration across reboots,
pacman -S networkmanagerand enable it
systemctl enable NetworkManager
Boot loader (GRUB)
Several boot loaders are supported but here are going with GRUB.
pacman -S grub grub-install --target=i386-pc /dev/sda grub-mkconfig -o /boot/grub/grub.cfg
A minimal base system is installed and configured, and ready to be used.
- Escape chroot with ctrl+d or
- Unmount everything
umount -R /mnt,
lsblkshould confirm this.
- Remove the USB drive
Unfortunately wifi settings were not persisted. Fix with:
nmcli dev wifi connect wifi-sid-goes-here password wifi-password-goes-here
useradd -m -g wheel ben passwd ben sudo vi /etc/sudoers
Uncomment (line 85) to allow members of the wheel group to sudo with (or without) password prompting:
%wheel ALL=(ALL) NOPASSWD: ALL
Desktop Environment (DE) vs Window Manager (WM)
In a nutshell a DE (like gnome or kde) is very heavy weight includes everything bar the kitchen sink, such as music players, document editors, file managers. They are incredibly bloated, but aimed at novice users that just want their computer “to work”. A WM (like i3wm) on the other hand is incredibly lean, I mean you don’t even get a status bar, but are very customisable and do just what you want and no more. Becuase of this WM’s tend to be allot snappier.
i3-gaps is a fork of the excellent i3wm tiling window manager. As its name implies it supports placing gaps (i.e. regions of space) between the tiled windows, providing a very neat and satisfying perseption of order when windows are automatically laid out.
pacman -S xorg-server xorg-xinit pacman -S xf86-video-amdgpu pacman -S i3-gaps i3status rxvt-unicode dmenu
To autostart i3:
~/.xinitrc with following:
startx. A black screen desktop should appear. This is good.
If you’ve gone down the window manager route, there is literally nothing. Given nothing is installed, here are some nice lightweight options I use:
- Text editor:
- PDF viewer:
- Hypervisor (VM’s):
- IRC client:
- Video player:
- Music player:
- Image viewer:
The term ricing originates from the auto enthusiast community, and was used predominantly as a perjorative to describe people who make modifications to their (usually Japanese) cars that add visual flair, but don’t improve performance. In the context of unixporn, it means customizing your desktop to make it look snazzy.
pacman -S feh
Add a task runner to
~/.config/i3/config to always set the wallpaper whenever i3 runs.
exec_always --no-startup-id feh --bg-scale /home/ben/Pictures/Wallpapers/nature3.jpg
pacman -S alsa-utils
Can now run
alsamixer to manage the sound card.
Load Xresources at startup
Need to customise the appearance of apps like
exec_always --no-startup-id xrdb -load ~/.Xresources
If you dont have a
~/.Xresources of your own, checkout my dotfiles.
pacman -S ttf-font-awesome powerline-fonts noto-fonts adobe-source-code-pro-fonts
Making GTK and QT apps pretty
pacman -S lxappearance gtk-chtheme gtk-engine-murrine gtk-engines gnome-themes-extra qt5ct
Define the following environment variables to override default QT styling:
export QT_STYLE_OVERRIDE=adwaita export QT_QPA_PLATFORMTHEME="qt5ct" export QT_AUTO_SCREEN_SCALE_FACTOR=0
This is a worth while endevour to take. I now have a very tailored system that works exactly how I want, without any bloat, and its FAST. Finally if interested, all my configuration from vim to urxvt to i3 is in my dotfiles git repo. Enjoy.