Arch Linux is a popular Linux distribution for experienced users. It’s known for its rolling release model, which means you’re always using the latest software. However, Arch Linux can be more challenging to install and maintain than other distributions. This article will walk you through the process of installing Arch Linux, from preparation to first boot. Follow each section carefully to ensure a successful installation.
Prerequisites
Before beginning the installation, it is crucial to ensure that you have:
- A USB drive (minimum 4GB)
- Internet connection
- Basic knowledge of command line operations
- At least 512MB RAM (2GB recommended)
- 20GB+ free disk space
- Backed up important data
Creating Installation Media
- Download the latest ISO from archlinux.org
- Verify the ISO signature for security
- Create bootable USB using dd command:
Boot Preparation
- Enter BIOS/UEFI settings
- Disable Secure Boot
- Set boot priority to USB
- Save and exit
What are the Initial Boot Steps?
- Boot from USB and select “Arch Linux install medium”
- Verify boot mode:
Internet Connection
For wired connection:
dhcpcd
For wireless:
station wlan0 scan
station wlan0 connect SSID
Verify connection:
System Clock
Update the system clock:
Disk Partitioning
- List available disks:
- Create partitions (example using fdisk):
For UEFI systems:
- EFI System Partition (ESP): 512MB
- Root partition: Remaining space
- Swap partition (optional): Equal to RAM size
For Legacy BIOS:
- Root partition: Most of the disk
- Swap partition (optional)
- Format partitions:
mkfs.fat -F32 /dev/sda1
# For root partition
mkfs.ext4 /dev/sda2
# For swap
mkswap /dev/sda3
swapon /dev/sda3
Mounting Partitions
Mount root partition:
For UEFI systems, mount ESP:
<span class="token">mount</span> /dev/sda1 /mnt/boot
Base System Installation
Install essential packages:
System Configuration
- Generate fstab:
- Change root into the new system:
- Set timezone:
hwclock --systohc
- Configure locale:
<span class="token"># Uncomment en_US.UTF-8 UTF-8</span>
locale-gen
<span class="token">echo</span> <span class="token">"LANG=en_US.UTF-8"</span> <span class="token">></span> /etc/locale.conf
- Set hostname:
- Configure hosts file:
<span class="token"># Add:</span>
<span class="token"># 127.0.0.1 localhost</span>
<span class="token"># ::1 localhost</span>
<span class="token"># 127.0.1.1 myhostname.localdomain myhostname</span>
Boot Loader Installation
For GRUB on UEFI systems:
grub-install --target<span class="token">=</span>x86_64-efi --efi-directory<span class="token">=</span>/boot --bootloader-id<span class="token">=</span>GRUB
<span class="token">grub-mkconfig</span> -o /boot/grub/grub.cfg
For GRUB on Legacy BIOS:
grub-install --target<span class="token">=</span>i386-pc /dev/sda
<span class="token">grub-mkconfig</span> -o /boot/grub/grub.cfg
Network Configuration
- Install network manager:
systemctl <span class="token">enable</span> NetworkManager
User Management
- Set root password:
- Create user account:
<span class="token">passwd</span> username
- Configure sudo:
<span class="token"># Uncomment %wheel ALL=(ALL) ALL</span>
Final Steps
- Exit chroot:
- Unmount partitions:
- Reboot:
Post-Installation
After first boot:
- Install graphics drivers:
<span class="token"># or</span>
pacman -S nvidia nvidia-utils <span class="token"># For NVIDIA</span>
- Install desktop environment (example with GNOME):
systemctl <span class="token">enable</span> gdm
- Install common applications:
Troubleshooting Tips
- If bootloader fails to install, verify EFI variables are available
- For wireless issues, ensure firmware is installed
- Check logs with
journalctl
for error messages
- Verify partition mounts with
lsblk
Maintenance Recommendations
- Regular system updates:
- Clean package cache periodically:
- Check system logs regularly: