Arch Linux is my operating system of choice. It runs smoothly once installed, but installation is rather complicated. This is a summary (mostly for my own reference) of how I arrive at my preferred working environment.
Installation
Boot from the installation medium and follow the installation guide, augmented with the steps below.
Partitioning
Create a new GPT partition table.
- Partition 1 is an EFI system partition with a FAT32 filesystem,
beginning at 1 MiB and ending at 512 MiB, mounted at
/boot/
. - Partition 2 is the primary ext4 filesystem, beginning at 512 MiB and
continuing to the end of the disk, mounted at
/
.
Base package installation
A few additions to the base package list ensure that the minimal new installation can connect to a wireless network, comfortably edit text files, and not crash due to buggy microcode:
pacstrap /mnt base base-devel linux linux-firmware intel-ucode vim networkmanager
Bootloader installation
The Arch Linux kernel supports EFISTUB, but many motherboard EFI implementations don’t work well with it. The next simplest option is the systemd bootloader.
From within the chroot, run the command bootctl install
. Then
create /boot/loader/entries/arch.conf
with the following contents:
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=UUID=????????-????-????-????-???????????? rw
The UUID for the root filesystem should be the same as what is
specified in the auto-generated /etc/fstab
.
System setup
Reboot into the newly-installed Arch system to finish the rest of the configuration.
User account
Log in as root and run the following:
useradd -G wheel -m dlaw
passwd dlaw
visudo # grant full permissions to group wheel
Now log out and log in as the new user.
Network
For a transient or wireless connection, use nmcli
to connect with NetworkManager.
For a permanent wired connection, create /etc/systemd/network/00-wired.network
according to the wiki
and then enable and start the systemd-networkd
and systemd-resolved
services.
GUI
Install window manager, terminal emulator, web browser, and fonts:
pacman -S xorg xorg-xinit i3 termite chromium
pacman -S ttf-dejavu ttf-liberation ttf-inconsolata terminus-font
If on a high resolution display, I prefer to enable 1.5x scaling.
The default pixel density is 96 dpi, so create .Xdefaults
containing:
Xft.dpi: 144
Create .xinitrc
to configure displays (if needed) and launch i3:
xrandr --output DP-2 --left-of DP-1 --set "Broadcast RGB" "Full"
exec i3
Now run startx
and do the rest of the configuration from within the GUI.
Set terminal appearance – create .config/termite/config
:
[colors]
foreground = #ffffff
background = #000000
[options]
font = Inconsolata 16
Custom i3 configuration to maximize usable space – modifications to .config/i3/config
:
font pango:Terminus 10
bindsym $mod+z move workspace to output left
bindsym $mod+x move workspace to output right
bindsym $mod+Shift+Return exec chromium
default_border pixel 1
default_floating_border pixel 1
bar {
mode hide
}
Autologin
Create /etc/systemd/system/getty@tty1.service.d/autologin.conf
containing
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin dlaw --noclear %I $TERM
Then, in ~/.bash_profile
:
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]] ; then
exec startx
fi
This is ugly, but I haven’t found a better way.
Audio
I prefer PipeWire over PulseAudio due to better Bluetooth support, lower latency, and support for JACK clients.
pacman -S pipewire pipewire-pulse pipewire-jack bluez bluez-utils
Some configuration for good Bluetooth performance:
- In
/etc/pipewire/media-session.d/bluez-monitor.conf
, setbluez5.msbc-support
andbluez5.sbc-xq-support
totrue
. - In
/etc/bluetooth/main.conf
, setAutoEnable
totrue
.
To automatically connect a bluetooth device, trust
it from within
a bluetoothctl
shell.
Tweaks
Remap caps lock to control and modify touchpad right-click behavior by
creating /etc/X11/xorg.conf.d/00-input.conf
:
Section "InputClass"
Identifier "keyboard"
MatchIsKeyboard "on"
Option "XkbOptions" "caps:ctrl_modifier"
EndSection
Section "InputClass"
Identifier "touchpad"
MatchIsTouchpad "on"
Option "ClickMethod" "clickfinger"
EndSection
Other packages
pacman -S openssh pass rsync syncthing python python-numpy python-scipy python-matplotlib arm-none-eabi-gdb arm-none-eabi-gcc arm-none-eabi-newlib make git python-pyserial zip unzip p7zip