Whether you're a seasoned Arch user or a beginner, this cheat sheet has got your back. Letโs dive in! ๐งโโ๏ธโก
๐ ๏ธ System Management
๐ Update the system
sudo pacman -Syu
๐ฅ Install a package
sudo pacman -S <package_name>
๐๏ธ Remove a package
sudo pacman -R <package_name>
๐งน Clean up unused dependencies
sudo pacman -Rns <package_name>
๐ Search for a package in the repo
pacman -Ss <package_name>
๐ List installed packages
pacman -Q
๐ฆ AUR (Arch User Repository) Management
๐ Install yay
(popular AUR helper)
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
๐ฅ Install a package from AUR
yay -S <package_name>
๐ Update all packages (including AUR)
yay -Syu
๐๏ธ Remove a package (AUR or repo)
yay -R <package_name>
๐พ File System and Disk Management
๐ Check disk space usage
df -h
๐๏ธ Check directory size
du -sh <directory_name>
๐ Mount a disk
sudo mount /dev/<device_name> /mnt
๐ช Unmount a disk
sudo umount /mnt
๐ ๏ธ List all drives and partitions
lsblk
โ๏ธ Format a drive to ext4
sudo mkfs.ext4 /dev/<device_name>
๐ฅ User Management
โ Add a new user
sudo useradd -m -G wheel -s /bin/bash <username>
๐ Set a password for a user
sudo passwd <username>
๐ Switch to another user
su - <username>
โ Delete a user
sudo userdel -r <username>
๐ Networking
๐ก Display active connections
ip a
๐ง Enable/disable a network interface
sudo ip link set <interface> up
sudo ip link set <interface> down
๐ Test network connectivity
ping <hostname_or_IP>
โป๏ธ Restart NetworkManager
sudo systemctl restart NetworkManager
โ๏ธ System Services
๐ Check the status of a service
systemctl status <service_name>
โถ๏ธ Start/โน๏ธ Stop/๐ Restart a service
sudo systemctl start <service_name>
sudo systemctl stop <service_name>
sudo systemctl restart <service_name>
๐ Enable a service at startup
sudo systemctl enable <service_name>
โ Disable a service at startup
sudo systemctl disable <service_name>
๐ง Kernel and Boot Management
๐ List installed kernels
ls /boot/vmlinuz*
๐ Update GRUB configuration
sudo grub-mkconfig -o /boot/grub/grub.cfg
๐ฅ Install a new kernel
sudo pacman -S linux-lts
๐๏ธ Remove an old kernel
sudo pacman -R linux-<version>
๐ Troubleshooting
๐ชต View system logs
journalctl -xe
๐ View boot logs
dmesg | less
โ Check failed systemd units
systemctl --failed
โจ Other Handy Commands
๐งน Clean the package cache
sudo pacman -Sc
๐ง Show Arch Linux system info
neofetch
๐ Generate a mirrorlist
sudo reflector --latest 20 --sort rate --save /etc/pacman.d/mirrorlist
โ๏ธ Edit pacman configuration
sudo nano /etc/pacman.conf
๐พ Save this cheat sheet, and take your Arch Linux journey to the next level! ๐
Have suggestions? Drop them in the comments below! ๐