-
-
Notifications
You must be signed in to change notification settings - Fork 1
Arch Linux Kernel Compilation
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to kernel compilation on Arch Linux, including downloading kernel source, configuring, compiling, and installing custom kernels.
Install build tools:
# Install base-devel
sudo pacman -S base-devel
# Install kernel build tools
sudo pacman -S linux-headersDownload source:
# Get kernel source
asp update linux
asp checkout linux
# Or download from kernel.org
wget https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.tar.xz
tar xf linux-6.1.tar.xz
cd linux-6.1Configure kernel:
# Copy existing config
cp /proc/config.gz .
gunzip config.gz
cp config .config
# Or use defaults
make defconfig
# Configure
make menuconfig
# Or use Arch config
zcat /proc/config.gz > .config
make olddefconfigCompile:
# Get number of CPUs
nproc
# Compile (use all CPUs)
make -j$(nproc)
# Build modules
make modules
# Install modules
sudo make modules_installInstall:
# Copy kernel
sudo cp arch/x86/boot/bzImage /boot/vmlinuz-linux-custom
# Update bootloader
sudo grub-mkconfig -o /boot/grub/grub.cfg
# Or systemd-boot
sudo cp arch/x86/boot/bzImage /boot/EFI/arch/vmlinuz-linux-customThis guide covered kernel compilation preparation, source download, configuration, compilation, and installation.
- Arch Linux Kernel Management - Kernel management
- Arch Linux Bootloader Configuration - Bootloader
- ArchWiki Kernel Compilation: https://wiki.archlinux.org/title/Kernel#Compilation
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.