Skip to content

Instantly share code, notes, and snippets.

@guptaanurag2106
Last active February 18, 2026 01:01
Show Gist options
  • Select an option

  • Save guptaanurag2106/321843c8a9552e121e7c0f2548055483 to your computer and use it in GitHub Desktop.

Select an option

Save guptaanurag2106/321843c8a9552e121e7c0f2548055483 to your computer and use it in GitHub Desktop.
A minimal Arch + Sway setup guide

Arch Linux + Sway Setup Guide

Assumes a UEFI system, single-disk setup, no encryption (LUKS), no LVM.
If you have different requirements, you can still read on and look up the relevant commands.

If you want an automated script, see the simple install script:


References


Arch Linux Installation

Setup: Boot & Live Environment


Setup: Networking (on Live ISO)

If using Ethernet, NetworkManager usually auto-connects — Wi-Fi steps can be skipped.

Check if any interface already has an IP

  • ip addr show

Wi-Fi using iwd

iwctl
station <iface> get-networks
exit
iwctl --passphrase "<password>" station <iface> connect <SSID>
ping google.com

iwd reference
https://wiki.archlinux.org/title/Iwd


Setup: Time & Firmware Mode

Set correct system time (important for pacman keyring and TLS)

timedatectl list-timezones    # see available timezones
timedatectl set-timezone <timezone>
timedatectl

Detect firmware type

  • ls /sys/firmware/efi/efivars

Presence means UEFI boot mode — later steps (EFI partition, GRUB target) depend on this
https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface


Setup: Disk Identification

Identify target disk (remember this value)

lsblk
fdisk -l

Choose a disk and use it completely (e.g. /dev/nvme0n1), not individual partitions


Setup: Partitioning

Partitioning assumptions

  • No LUKS
  • No LVM
  • Single root filesystem
  • Separate EFI + swap
  • GPT partition table (required for UEFI)

https://wiki.archlinux.org/title/Partitioning#GUID_Partition_Table

Why these sizes

fdisk /dev/nvme0n1

Create partitions

  • EFI System Partition – 1G
  • Swap – 4G
  • Linux filesystem – rest (type 20)
  • EXT4 root partition (for BTRFS/ZFS etc., only the mkfs command changes)
mkfs.vfat -F32 /dev/nvme0n1p1   # partition 1: EFI
mkfs.ext4 /dev/nvme0n1p3       # partition 3: root
mkswap /dev/nvme0n1p2          # partition 2: swap
swapon /dev/nvme0n1p2
lsblk

Setup: Mounting Filesystems

Mount root first, EFI at standard UEFI path

mount /dev/nvme0n1p3 /mnt
mount --mkdir /dev/nvme0n1p1 /mnt/boot/efi

UEFI systems require EFI mounted before bootloader install

BIOS systems differ and are not discussed here — see the link below
https://wiki.archlinux.org/title/GRUB#BIOS_systems


Setup: Pacman Keyring

Initialize trust database (required before pacstrap)

pacman-key --init
pacman-key --populate

https://wiki.archlinux.org/title/Pacman/Package_signing


Setup: Base System Install

  • Install intel-ucode for Intel CPUs, amd-ucode for AMD CPUs (based on your system)
pacstrap -i /mnt \
  base linux linux-firmware \
  linux-lts linux-lts-firmware \
  vim grub efibootmgr sudo \
  networkmanager dhclient wpa_supplicant dialog \
  intel-ucode man man-db pacman

Notes


Setup: Filesystem Table

https://wiki.archlinux.org/title/Fstab

Generate filesystem table (fstab): defines what gets mounted at boot and where
Uses UUIDs to avoid disk name changes

genfstab -U /mnt
genfstab -U /mnt >> /mnt/etc/fstab

Verify UUID-based mounts before proceeding


Setup: Chroot & System Identity

arch-chroot /mnt

passwd
enter root password

useradd -m -G wheel <user>
passwd <user>

create primary user

echo "<hostname>" > /etc/hostname

remember this hostname value


Setup: Timezone & Locale

ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
hwclock --systohc
vim /etc/locale.gen

uncomment en_US.UTF-8 UTF-8 (or your locale)

locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf

https://wiki.archlinux.org/title/Locale


Setup: GRUB Bootloader (UEFI)

grub-install \
  --target=x86_64-efi \
  --efi-directory=/boot/efi \
  --bootloader-id=GRUB

UEFI-only — do not use on BIOS systems

cp /usr/share/locale/en@quot/LC_MESSAGES/grub.mo \
   /boot/grub/locale/en.mo

GRUB localized messages

grub-mkconfig -o /boot/grub/grub.cfg

Finalize GRUB configuration — regenerates menu using installed kernels and initramfs

https://wiki.archlinux.org/title/GRUB


Setup: GPU (Intel)

For AMD or NVIDIA GPUs, see:

pacman -S mesa intel-media-driver

Mesa = OpenGL, intel-media-driver = VAAPI decode

lspci | grep -i vga

https://wiki.archlinux.org/title/Intel_graphics


Finish Installation

exit
umount -R /mnt
reboot

Post-Install Setup (Root Login)

Setup: Networking (NetworkManager)

nmcli radio wifi on
nmcli device wifi list
nmcli device wifi connect <SSID> password "<password>"

If connection fails, check interface names with:

  • nmcli device status

https://wiki.archlinux.org/title/NetworkManager


Setup: Sudo (if not working)

su
pacman -S sudo
visudo

Uncomment this line

%wheel ALL=(ALL:ALL) ALL
usermod -aG wheel <user>
logout    # group changes apply only after new login
groups
sudo whoami    # verify sudo

Desktop Environment Choice

This guide continues with Sway.
If you want another desktop (GNOME, KDE, Hyprland), consult the relevant Arch Wiki pages below.


Sway Desktop Setup

Setup: Core Wayland Stack

pacman -S sway swayidle swaybg waybar rofi \
  xorg-xwayland xorg-xlsclients \
  qt5-wayland glfw-wayland \
  brightnessctl

Setup: AUR Helper

https://wiki.archlinux.org/title/Arch_User_Repository

pacman -S base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay && makepkg -si
yay -S swaylock-effects

Setup: Display Manager (SDDM)

https://wiki.archlinux.org/title/SDDM

A display manager handles graphical login and session startup

sudo pacman -S sddm
systemctl enable sddm
# edit file /etc/sddm.conf
[Autologin]
User=<user>
Session=sway

[General]
Numlock=on
# edit file /usr/share/xsessions/sway.desktop
[Desktop Entry]
Name=Sway
Exec=sway
Type=Application

Setup: Audio (PipeWire)

PipeWire replaces PulseAudio and integrates ALSA under one stack.

  • ALSA: kernel-level audio drivers
  • PulseAudio: legacy user-space sound server
  • PipeWire: modern low-latency replacement for both

https://wiki.archlinux.org/title/PipeWire

pacman -S pipewire pipewire-pulse pavucontrol
systemctl --user enable --now pipewire pipewire-pulse
pacman -S rtkit alsa-utils sof-firmware
systemctl enable --now rtkit-daemon

If no audio, check:

  • pactl info
  • pavucontrol

Setup: Bluetooth

https://wiki.archlinux.org/title/Bluetooth

pacman -S bluez bluez-utils blueman
modprobe btusb    # loads Bluetooth USB kernel module (no output means success)
systemctl enable --now bluetooth

Setup: Common Software

pacman -S base-devel curl rsync wget zip unzip tar \
  vlc libreoffice-fresh btop stow exa \
  nomacs okular cliphist ssh neofetch nemo \
  calibre dmidecode gvfs jmtpfs usbutils \
  man-pages inetutils speech-dispatcher

Setup: Development Environment

Example dev setup — install tools based on your workflow and usage

yay -S tmux fzf gdb fd ripgrep \
  python python-pip python-neovim \
  jq cmake bear xremap
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Misc Setup

Pacman UI

  • Edit /etc/pacman.conf
  • Under [options], uncomment:
    Color
    

Dotfiles

cd ~
git clone https://github.com/guptaanurag2106/dotfiles.git
cd dotfiles
# use stow or just ln -s
git config core.fileMode false

SSD Trim

systemctl enable --now fstrim.timer

https://wiki.archlinux.org/title/Solid_state_drive

External Drives

pacman -S udisks2
udisksctl power-off -b /dev/sdX

Extras (Optional)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment