Download an ISO installation image from one of the mirrors.
e.g. West coast: mirrors.ocf.berkeley.edu
If you are installing a virtual machine you can skip this section. For physcial hardware you will need to copy the Arch installation ISO to a bootable flash drive.
To create bootable flash drives from the downloaded ISO image in Windows you will need a tool such as Etcher or Rufus. Either one can easily be installed using the Chocolatey package manager:
# Install Etcher
choco install Etcher
# Or install Rufus
choco install Rufus
Etcher also works on OS X and can be installed using Homebrew:
brew cask install Etcher
TODO: include
dd
commands to create the bootable flash drive.
After booting the flash drive on your target installation system you will need to partition the installation disk before installing the Arch system to it.
If you are installing on a HIDPI system you may need to increase the font size in the console. The following will install a larger font and enable it for the current session:
pacman -Sy
pacman -S terminus-font
setfont ter-v32n
showconsolefont
Optimize pacman mirror list
pacman -S reflector
reflector --verbose -l 10 -f 5 -c US -p https --save /etc/pacman.d/mirrorlist
First, find the drive you want to install to using the lsblk
command. If you are installing in a virtual machine or on a laptop with a single hard drive this will likely be /dev/sda
E.g.
> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 64G 0 disk
|-sda1 8:1 0 512M 0 part /boot
|-sda2 8:3 0 32G 0 part /
`-sda3 8:4 0 19.8G 0 part /home
Once you have determined the disk you want to install Arch to you can partition the disk using the fdisk
command:
fdisk /dev/sda
Create 4 partitions to isolate specific functional areas of your Arch system. These patitions are boot, root and home
This partition will contain things like the Linux kernel image and boot menu configuration etc. Only about 200MB of space will be required for this partition. To create this partition use the following steps from within the fdisk
utility:
- Type
o
and press<Enter>
to create aDOS
style partition table. This will clear any existing partitions and make the disk ready for you to create the new partitioning scheme. - Type
n
to create a new partition. - Press
<Enter>
to accept the defaultp
primary partition type. - Press
<Enter>
again to accept the defaul first sector of 2048. - Enter
+200M
for the last sector.
- Type
n
to create a new partition. - Press
<Enter>
to accept the defaultp
primary partition type. - Press
<Enter>
again to accept the default. - Enter
+32G
for the last sector.
- Type
n
to create a new partition. - Press
<Enter>
to accept the defaultp
primary partition type. - Press
<Enter>
again to accept the default. - Press
<Enter>
again to use the rest of the space fore the home partition.
mkfs.ext4 /dev/sda1 -L boot
mkfs.ext4 /dev/sda2 -L root
mkfs.ext4 /dev/sda3 -L home
# Mount the root partition
mount /dev/sda2 /mnt
# Create mount points for boot and home directories
mkdir /mnt/boot
mkdir /mnt/home
# Mount the boot and home partitions
mount /dev/sda1 /mnt/boot
mount /dev/sda3 /mnt/home
pacstrap /mnt base base-devel linux linux-firmware intel-ucode grub networkmanager bind-tools sudo openssh gnupg zsh vim neovim git htop curl fd fasd fzf ripgrep exa bat reflector neofetch
First, create the fstab configuration file using the mounted filesystem structure on /mnt
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
Configure the GRUB bootloader
# Install the GRUB bootloader
grub-install --target=i386-pc /dev/sda
# Generate the GRUB boot configuration
# NOTE: This is templatized from /etc/default/grub
grub-mkconfig -o /boot/grub/grub.cfg
Or configure the systemd-boot loader if using EFI
Install the boot loader:
bootctl install --path=/boot
Configure the boot menu:
esp/loader/loader.conf
default arch
timeout 4
esp/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID={uuid from blkid} rw
blkid -s PARTUUID -o value /dev/
sdxY
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
hwclock --systohc
Uncomment the en_US locales in /etc/locale.gen and run locale-gen
vim /etc/locale.gen
locale-gen
Set the LANG
variable in locale.conf
Example locale.conf:
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
# Add the hostname to /etc/hostname
echo "hostname" > /etc/hostname
Configure localhost names
vim /etc/hosts
Add the following:
127.0.0.1 localhost
::1 localhost
127.0.0.1 myhostname.local myhostname
Enable NetworkManager service to configure the network at startup.
systemctl enable NetworkManager
passwd
useradd -mg users -G wheel -s /usr/bin/zsh david
passwd david
Enable sudo for members of the wheel group using visudo
.
Install yay
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
yay -S yadm starship-bin antibody-bin
yadm clone https://github.com/xpando/dotfiles
If instsalling in a VirtualBox VM:
yay -S virtualbox-guest-utils
sudo systemctl enable vboxservice
sudo systemctl start vboxservice
yay -S alsa-utils pulseaudio-alsa pulsemixer
# Test the audio setup
alsamixer
pulsemixer
speaker-test -c 2
#!/bin/bash
pkgs=(
# Base
xorg-server
xorg-xinit
xorg-apps
mesa
xf86-video-vesa
# Intel drivers
Xf86-video-intel
# Nvidia drivers
nvidia
nvidia-settings
# VirtualBox drivers
virtualbox-guest-modules-arch
virtualbox-guest-utils
# Fonts
pango
noto-fonts # Base system fonts
nerd-fonts-iosevka # Monospaced terminal/programming font with ligatures
otf-font-awesome # Icons
# Terminal
alacritty
# WM
i3 # Tiling window manager
i3blocks-git # Latest features for status bar
rofi # Launcher
compton # Compositer
nitrogen # Desktop background
# Apps
google-chrome # Web browser
qutebrowser # Keyboard focused browser (uses chromium render engine)
ranger # Terminal based file browser
)
yay -S ${pkgs[@]}
# Enable VirtualBox guest additions
sudo systemctl enable vboxservice
sudo systemctl start vboxservice
Install JDKs and tools like gradle and sbt with SDKMAN
yay -S dotnet-sdk
Edit /etc/vconsole.conf
yay -S powerline-fonts-git
sudo vim /etc/vconsole.conf
KEYMAP=us
FONT=ter-powerline-v20n
sudo systemctl enable sshd
sudo systemctl start sshd
My TTY color theme:
sudo curl https://gist.githubusercontent.com/xpando/5c9ad198c917542a67b06991b24a59c2/raw/5870ca11ecfd1b8c0cd1ebfb1ad66218e5803f21/issue > /etc/issue
This installs a systemd unit that sets the tty to dark solarized theme:
https://github.com/adeverteuil/console-solarized
yay -S console-solarized-git
https://wiki.archlinux.org/index.php/Color_output_in_console
sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
GRUB_GFXMODE=1600x1200x32
GRUB_GFXPAYLOAD_LINUX=keep
sudo grub-mkconfig -o /boot/grub/grub.cfg
- Example Arch install steps: https://gist.github.com/softmoth/1388e99bc718fd7414ac0c6787d711cd
- Solarized VTE: https://github.com/adeverteuil/console-solarized
- Powerline fonts for VTE: https://github.com/powerline/fonts/tree/master/Terminus/PSF
- Color Themes: http://terminal.sexy (Currenlty using xcolors.net gjm theme)