Installation guide Français
Installation Guide for Arch Linux: A Comprehensive Step-by-Step Approach
Welcome to our exhaustive guide on installing Arch Linux. This tutorial will walk you through every step of the process, from preparing your system to configuring your desktop environment. We aim to provide a clear, concise, and complete installation guide for both beginners and experienced users. This guide focuses on the standard installation process using the official Arch Linux installation medium.
Prerequisites: Before You Begin
Before embarking on the Arch Linux installation, ensure you have the following:
- A Compatible Computer: Ensure your hardware meets the minimum requirements for Arch Linux. This includes a 64-bit (x86_64) compatible system, a reasonable amount of RAM (at least 2GB is recommended), and sufficient storage space for the operating system and your applications.
- A Bootable Arch Linux Installation Medium: Download the latest Arch Linux ISO image from the official website (https://archlinux.org/download/). Create a bootable USB drive using tools like
dd,Rufus(for Windows), orBalenaEtcher. - Internet Connectivity: A stable internet connection is crucial for downloading packages during the installation process. Ensure you have a working Ethernet connection or a Wi-Fi adapter compatible with Arch Linux.
- Time and Patience: The Arch Linux installation process is more involved than other distributions. Allocate sufficient time and patience to follow the instructions carefully.
- Backup Your Data: Back up any important data from the storage device you intend to install Arch Linux on. The installation process will erase all data on the chosen drive.
Booting from the Installation Medium
Booting the Arch Linux ISO
- Insert the USB drive into your computer and restart it.
- Enter the Boot Menu: During startup, press the key that activates your computer’s boot menu. This key varies depending on your motherboard manufacturer (e.g.,
Esc,F2,F12,Del). Consult your motherboard’s documentation if you’re unsure. - Select the USB Drive: From the boot menu, select the USB drive containing the Arch Linux installation medium.
- Boot into the Arch Linux Environment: The system will boot into the Arch Linux live environment. You will be presented with a root shell prompt.
Initial System Setup in the Live Environment
After booting into the live environment, the first steps involve basic system configuration before the actual installation of Arch Linux:
Keyboard Layout and Font
Set Keyboard Layout: By default, the live environment uses a US keyboard layout. To change it to your preferred layout, use the
loadkeyscommand. For example, to set a French keyboard layout:loadkeys fr-latin9To see available keyboard layouts, use
ls /usr/share/kbd/keymaps/**/*.map.gz.Set Font: If you find the default font difficult to read, you can change it. For example:
setfont lat2-term-16To list available fonts, use
ls /usr/share/kbd/consolefonts/.
Verify Internet Connection
Check Network Connectivity: Verify that you have an active internet connection. You can use the
pingcommand to test connectivity to a known server like Google:ping archlinux.org -c 3If
pingfails, you might need to configure your network manually.
Partitioning the Disk
This step involves creating partitions on your storage device. This is a crucial process in any Arch Linux installation.
Identify Disks: Use the
lsblkcommand to list available block devices (disks and partitions). Identify the disk you want to install Arch Linux on (e.g.,/dev/sda,/dev/nvme0n1).lsblkPartitioning with
fdiskorgdisk: We strongly recommend usinggdiskfor GPT partitioning on modern systems.fdiskis an alternative for MBR partitioning.# For GPT partitioning gdisk /dev/sdX # Replace sdX with your disk identifieror
# For MBR partitioning fdisk /dev/sdX # Replace sdX with your disk identifierInside
gdisk, typegto create a new GPT partition table.Create the following partitions. The exact sizes can be adjusted based on your needs.
- EFI System Partition (ESP): (Required for UEFI systems)
- Size: 512MB or more
- Type code: EF00 (for gdisk)
- Partition number: 1
- Filesystem: FAT32
- Root Partition (/):
- Size: At least 20GB (recommended)
- Type code: 8300 (for gdisk)
- Partition number: 2 (or the next available)
- Filesystem: ext4 (recommended)
- Swap Partition (Optional): Create a swap partition if you desire hibernation or if your system has limited RAM.
- Size: Recommended to be at least the size of your RAM, or more.
- Type code: 8200 (for gdisk)
- Partition number: 3 (or the next available)
- Filesystem: swap
- EFI System Partition (ESP): (Required for UEFI systems)
Write the changes to the disk by typing
wingdiskand confirming.
Formatting Partitions: Format the partitions with the appropriate filesystems.
Format the EFI System Partition (ESP) as FAT32:
mkfs.fat -F32 /dev/sdX1 # Replace sdX1 with your ESP partition identifierFormat the root partition as ext4:
mkfs.ext4 /dev/sdX2 # Replace sdX2 with your root partition identifierFormat the swap partition (if created):
mkswap /dev/sdX3 # Replace sdX3 with your swap partition identifier swapon /dev/sdX3
Mounting Partitions: Mount the partitions to prepare for the Arch Linux installation.
mount /dev/sdX2 /mnt # Mount the root partition to /mnt mkdir /mnt/boot # Create boot directory mount /dev/sdX1 /mnt/boot # Mount the EFI partition to /mnt/boot if using UEFI
Installing the Base System
This is where the core Arch Linux packages are installed.
Update the Pacman Mirror List: Before installing packages, update the pacman mirror list to ensure you have the latest package information and that you are connected to a fast mirror.
pacman -SyyInstall the Base System: Install the base system packages using
pacstrap.pacstrap /mnt base linux linux-firmware nanoThis command installs the essential packages for Arch Linux. It also includes the Linux kernel and firmware, as well as a text editor, which will be valuable for configuration.
Configuring the System
After the base system installation, configure the system settings within the newly installed environment.
Generate an fstab File: Generate an
fstabfile to define how your partitions should be mounted at boot.genfstab -U /mnt >> /mnt/etc/fstabReview the generated
fstabfile usingnano /mnt/etc/fstaband ensure the entries are correct. Correct any mistakes.Chroot into the System: Enter the newly installed system using the
arch-chrootcommand. This allows you to configure the system as if you were running it from the installed hard drive.arch-chroot /mntSet the Time Zone: Set your system’s timezone. For example, to set the timezone to America/Los_Angeles:
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtimeUse
timedatectl statusto verify the timezone setting. Synchronize the system clock.timedatectl set-ntp trueConfigure Localization: Edit the
/etc/locale.genfile and uncomment your desired locales. Then, generate the locale files.nano /etc/locale.genUncomment the lines for your locales (e.g.,
en_US.UTF-8 UTF-8,fr_FR.UTF-8 UTF-8). Then, generate the locales:locale-genSet the system locale by editing
/etc/locale.conf:nano /etc/locale.confAdd the following line, replacing
en_US.UTF-8with your chosen locale:LANG=en_US.UTF-8Hostname: Set your system’s hostname by editing
/etc/hostname:echo "myhostname" > /etc/hostname # Replace "myhostname" with your desired hostnameModify
/etc/hosts:nano /etc/hostsAdd the following lines, replacing
myhostnamewith your chosen hostname:127.0.0.1 localhost ::1 localhost 127.0.1.1 myhostname.localdomain myhostnameNetwork Configuration: Configure your network. If you’re using Ethernet, the configuration is often straightforward. For Wi-Fi, additional steps are needed.
Ethernet: The
systemd-networkdandsystemd-resolvedservices are recommended for Ethernet configuration.systemctl enable systemd-networkd.service systemctl enable systemd-resolved.serviceRestart your system or use
systemctl restart systemd-networkdto apply the changes.Wi-Fi: Install
iwctland use it to connect to your Wi-Fi network:pacman -S iwctl iwctlWithin
iwctl:[iwctl] station wlan0 scan [iwctl] station wlan0 get-networks [iwctl] station wlan0 connect <your_wifi_network_name> [iwctl] exit
Set a Root Password: Set a strong password for the root user:
passwdInstall a Bootloader: This step is crucial for booting into your Arch Linux installation. The bootloader loads the kernel and initial ramdisk (initramfs) to start the operating system. We’ll use GRUB as an example.
Install GRUB:
pacman -S grub efibootmgr # efibootmgr is needed for UEFI systemsInstall GRUB to the EFI System Partition (for UEFI systems)
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUBor install GRUB to the MBR (for BIOS systems):
grub-install /dev/sdX # replace sdX with your disk identifierGenerate the GRUB configuration file:
grub-mkconfig -o /boot/grub/grub.cfg
Post-Installation and Customization
After completing the core installation, several steps are required to tailor your Arch Linux installation to your specific needs.
User Creation: Create a regular user account for daily use.
useradd -m -g users -G wheel <your_username> # Replace <your_username> passwd <your_username>Enable Sudo (Optional): Grant your user sudo privileges.
EDITOR=nano visudoUncomment the line:
%wheel ALL=(ALL) ALLSave the file.Install Desktop Environment/Window Manager (Choose One): Select and install a desktop environment or window manager.
GNOME:
pacman -S gnome gnome-extraKDE Plasma:
pacman -S plasma kde-applicationsXFCE:
pacman -S xfce4 xfce4-goodiesi3 (Window Manager):
pacman -S i3-gaps i3status i3lockOther DEs/WMs: Research other available options.
Install Display Manager (Recommended): A display manager provides a graphical login screen.
GDM (for GNOME):
pacman -S gdm systemctl enable gdm.serviceSDDM (for KDE Plasma):
pacman -S sddm systemctl enable sddm.serviceLightDM (works with various DEs/WMs):
pacman -S lightdm lightdm-gtk-greeter systemctl enable lightdm.service
Install Additional Software: Install essential and preferred applications such as web browsers, text editors, office suites, media players, etc.
pacman -S firefox libreoffice gimpConfigure Sound: Install and configure sound server.
pacman -S pulseaudio pulseaudio-alsa pavucontrolEnable and start the PulseAudio service.
systemctl --user enable pulseaudio.service systemctl --user start pulseaudio.serviceConfigure Network Time Protocol (NTP):
pacman -S ntpd systemctl enable ntpd.service systemctl start ntpd.serviceConfigure Drivers:
- Graphics Drivers: Install the appropriate drivers for your graphics card (e.g.,
xf86-video-atifor AMD,xf86-video-nvidiafor NVIDIA,xf86-video-intelfor Intel). - Wireless Drivers: If you are using a wireless network card, ensure that the necessary drivers are installed.
- Graphics Drivers: Install the appropriate drivers for your graphics card (e.g.,
Reboot and Enjoy
Exit chroot:
exitUnmount Partitions:
umount -R /mntReboot:
reboot
Your Arch Linux installation should now be complete. After the reboot, you should be able to log in to your chosen desktop environment or window manager. Congratulations! You have successfully installed Arch Linux. Enjoy the flexibility and power it offers! Remember to consult the Arch Linux Wiki for further information and troubleshooting. The Wiki is your best resource for any Arch Linux related issues. This installation guide is a starting point, and the journey of customizing and learning Arch Linux is ongoing.