A simple documentation of ArchLinux by Adrian Noces — crafted for personal learning, experimentation, and mastery of the system. This documentation serves as a personal lab notebook, capturing commands, configs, and concepts. While made for his own use, those who understand are welcome to explore, learn, and build from it.
NOTE: I focused on Unencrypted Arch Install to much that Encrypted Arch Install becomes so outdated but browsing on encrypted can help encrypt setup.
This is a step-by-step guide to installing Arch Linux with options for both encrypted and unencrypted setups. It covers disk partitioning, LVM setup, filesystem formatting, mounting, base system installation, user creation, desktop environments, driver installation, and final system configuration.
Usage: pacman or yay [OPTIONS...] <package>...
[OPTIONS]
-S, --install Install a package
-Ss, --search Search for packages in the repo
-Qs, --query-installed Search installed packages
-Sy, --sync-db Refresh the package database
-Syu, --upgrade-system Full system upgrade
-R, --remove Remove a package
-Rs, --remove-deps Remove a package and unused dependencies
-Rns, --remove-clean Deep clean (remove config files too)
-Sc, --clean-cache Remove old/unused cache
yay
sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Usage: nano /Path/to/file
⚙️ System Permissions & Users
/etc/sudoers → Who can use sudo and how.
/etc/passwd → All user account info.
/etc/shadow → Encrypted user passwords.
/etc/group → User groups and their members.
/etc/login.defs → Default settings for user logins.
🌐 Networking & DNS
/etc/resolv.conf → DNS settings.
/etc/hosts → Maps hostnames to IP addresses (local DNS).
/etc/hostname → Your systems name on the network.
/etc/network/interfaces → Manual network config (Debian-based).
/etc/netplan/*.yaml → Network settings (newer Ubuntu).
/etc/ssh/sshd_config → SSH server config.
/etc/hosts.allow & /etc/hosts.deny → TCP wrappers for access control.
🧠 System Brain & Boot
/etc/fstab → Defines how drives mount at boot.
/etc/init.d/ → Old-style startup scripts.
/etc/systemd/ → Systemd service files (modern boot management).
/etc/default/grub → Bootloader (GRUB) config.
/boot/grub/grub.cfg → Auto-generated GRUB config.
🧠🧠 Package & Service Managers
/etc/pacman.conf → Pacman config (Arch-based distros).
/etc/apt/sources.list → APT repos (Debian/Ubuntu).
/etc/systemd/system/ → Custom systemd services.
🧠🔐 Security & Firewalls
/etc/ufw/ufw.conf → UFW firewall settings.
/etc/fail2ban/ → Intrusion prevention settings.
/etc/audit/auditd.conf → Linux audit framework.
💻 Desktop & Shell
/etc/profile → System-wide shell settings.
/etc/bash.bashrc → System-wide bashrc.
/etc/environment → Global environment variables.
/etc/X11/xorg.conf → X11 (display server) config.
dotfiles
~/.config
~/.bashrc
~/.zshrc
~/.xinitrc
~/.xsession
~/.profile
~/.bash_profile
~/.vimrc
~/.config/nvim/init.vim
~/.config/nano/nanorc
~/.gitconfig
🧠🕳️ Bonus: Black Hole of Power
/proc/ → Virtual files that show real-time kernel data (like /proc/cpuinfo, /proc/meminfo).
/sys/ → Kernel interface to hardware devices.
dd
sudo dd if=/path/to/your.iso of=/dev/sdX bs=4M status=progress conv=fsync
| Flag | Meaning |
| —————– | ——————————————————————— |
| if=
| Input file – the ISO you want to burn (e.g. if=linux.iso
) |
| of=
| Output file – your target drive (e.g. of=/dev/sdX
, like USB) |
| bs=4M
| Block size – read/write 4MB at a time (faster & safer) |
| status=progress
| Show real-time progress info while writing |
| conv=fsync
| Force write buffer to disk before finishing – ensures full data write |
// add user only
useradd -m -g users username
// add secondary admin
useradd -m -g users -G sudo adminName
// add super admin
useradd -m -g users -G sudo,wheel adminName
// kill user processes
sudo pkill -u username,adminName
// delete user
sudo userdel -r username,adminName
Usage: sudo usermod [OPTIONS] username,adminName
[OPTIONS]
-aG, --add-user-to-group append the user to a specified group
Usage: sudo usermod -aG sudo <username>
-L, --lock-user
Usage: sudo usermod -L <username>
-U, --unlock-user
Usage: sudo usermod -U <username>
-l, --rename-user
Usage: sudo usermod -l <prevname> <newname>
-d, --remove-to-suplemmentary-group
Usage: sudo gpasswd -d <username> <group>
[OPTIONS]
--change-user-passwd, change user or admin password
Usage: passwd <username>
--change-root-password
Usage: passwd
wpa_passphrase "SSID" "PASSWD" > /etc/wpa_supplicant/wpa.conf
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa.conf
dhcpcd wlan0
sudo systemctl enable dhcpcd@wlan0.service
sudo pacman -S openresolv
sudo nano /etc/dhcpcd.conf
nohook resolv.conf
pacman-key --init
pacman-key --populate archlinux
pacman -Sy archlinux-keyring
Creates cmd with c or any
compile it
move it to the /usr/local/bin
now you have working global cmd
yay -S tela-icon-theme papirus-icon-theme whitesur-icon-theme
yay -S qogir-gtk-theme nordic-theme arc-gtk-theme
yay -S zram-generator
sudo mkdir -p /etc/systemd/zram-generator.conf.d
sudo nano /etc/systemd/zram-generator.conf.d/zram.conf
[zram0]
zram-size = ram / 4
compression-algorithm = zstd
sudo systemctl daemon-reexec
sudo systemctl restart systemd-zram-setup@zram0.service
sudo pacman -Syu pipewire pipewire-pulse pipewire-alsa wireplumber pavucontrol cava
systemctl --user enable pipewire pipewire-pulse wireplumber
systemctl --user start pipewire pipewire-pulse wireplumber
sudo pacman -S glow
glow markdown.md
// download and enable printer manager
sudo pacman -S cups
sudo systemctl enable --now cups.service
// install printer drivers
yay -S epson-inkjet-printer-escpr
yay -S epson-inkjet-printer-escpr2
sudo pacman -S sway swaybg swaylock swayidle \
xorg-xwayland xorg-xlsclients \
grim slurp wl-clipboard foot
yay -S swayfx
mkdir -p ~/.config/sway
cp /etc/sway/config ~/.config/sway/config
Breakdown:
sway – the WM itself
swayfx - sway but more customizable
swaybg – wallpapers
swaylock – lock screen
swayidle – idle handling
xorg-xwayland – runs old X11 apps on Wayland
grim & slurp – screenshots
wl-clipboard – clipboard management
foot – terminal (Wayland native, fast)
sudo pacman -S greetd greetd-tuigreet
sudo nano /etc/greetd/config.toml
[default_session]
command = "sway"
user = "angelica"
sudo systemctl enable greetd --now
sudo tlp-stat -s
sudo tlp-stat -b
Lower your brightness
sudo nano /etc/tlp.conf
// start charge when hit 40%
START_CHARGE_THRESH_BAT0=40
// stop charge when hit 80%
STOP_CHARGE_THRESH_BAT0=80
// dynamic freq
CPU_SCALING_GOVERNOR_ON_BAT=schedutil
// turn off power surge when using battery or cpu boost
CPU_BOOST_ON_BAT=0
// SSD/HDD uses less power when idle.
DISK_APM_LEVEL_ON_BAT="128 128"
// Tiny battery savings when no audio is playing.
SOUND_POWER_SAVE_ON_BAT=1
// Makes sure your schedutil + boost settings are always applied automatically.
RESTORE_DEVICE_STATE_ON_STARTUP=1
sudo systemctl restart tlp
sudo pacman -Syu intel-undervolt
sudo nano /etc/intel-undervolt.conf
enable yes
undervolt 0 'CPU' -85 // its -85mV
undervolt 1 'GPU' -50 // -50mV
undervolt 2 'CPU Cache' -85 // -85mV
undervolt 3 'System Agent' 0
undervolt 4 'Analog I/O' 0
interval 5000
daemon undervolt
sudo systemctl enable --now intel-undervolt
sudo intel-undervolt apply
sudo intel-undervolt measure # shows current offsets / power readings
// owning a logical volume or partition so you can read and write on it as a normal user
sudo chown -R adrian:users /data
Note: Warning: You must:
Make sure your /boot partition /dev/sda1 is an ESP EFI System Partition
You must connect to AC
battery should be > 50%
Check suspend or hibernate
Take a screenshot or note of your BIOS settings
Go on and update
sudo pacman -Syu fwupd or yay -Syu fwupd
sudo systemctl enable --now fwupd.service
// setups
sudo fwupd refresh
sudo fwupd get-devices
sudo fwupd get-updates
// actual update the system
sudo fwupd update
// note that it's normal that your laptop get rebooted many times
sudo pacman -S gvfs gvfs-mtp gvfs-gphoto2 mtpfs
reload sway ctrl-shift-c
sudo pacman -S pipewire pipewire-pulse xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user enable --now pipewire pipewire-pulse
systemctl --user enable --now xdg-desktop-portal xdg-desktop-portal-wlr
check
systemctl --user status xdg-desktop-portal-wlr
sudo pacman -S feh wf-recorder mpv grim
feh path/image.png // view image
mpv path/video.mkv // watch video
wf-recorder -f Videos/$(date).mkv // screen record
ctrl-c to stop recording
press "prtSc" to take screenshot using grim
sudo pacman -S ffmpeg
ffmpeg -i input.mkv -c copy output.mp4
// if compatible issue on mp4 re-encode
ffmpeg -i input.mkv -c:v libx264 -c:a aac output.mp4
// all purpose
sudo pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra
sudo pacman -S ufw
sudo systemctl enable ufw
sudo systemctl start ufw
sudo ufw allow ssh
sudo ufw allow 80/tcp # web dev
sudo ufw allow 443/tcp
sudo ufw status verbose