Tutoriel GNU/Linux - installer ArchLinux

3 min read 4 hours ago
Published on Oct 06, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through the process of installing ArchLinux, a popular and customizable GNU/Linux operating system. Whether you're a beginner or an experienced user, this step-by-step guide will help you navigate the installation process effectively.

Step 1: Understand ArchLinux

  • ArchLinux is known for its simplicity and customization.
  • It is suitable for users who want to learn more about Linux and prefer a hands-on approach to installation and configuration.

Step 2: Prepare for Installation

  • Ensure you have the following:
    • A computer or virtual machine.
    • A stable internet connection.
    • Support documentation for reference.

Step 3: Download the ISO Image

  • Visit the official ArchLinux website to download the latest ISO image.
  • Save the ISO file to your local storage.

Step 4: Configure VirtualBox (if applicable)

  • Open VirtualBox and create a new virtual machine.
  • Set the operating system type to "Linux" and version to "ArchLinux (64-bit)."
  • Allocate at least 2GB of RAM and create a virtual hard disk (at least 20GB).
  • Mount the ArchLinux ISO by selecting it in the virtual machine settings.

Step 5: Start the Installation

  • Boot the virtual machine from the ArchLinux ISO.
  • You will see the ArchLinux command prompt; from here, you can begin the installation.

Step 6: Create and Format Partitions

  • Use the following commands to identify your disk:
    fdisk -l
    
  • Use fdisk or parted to create partitions:
    • Create a root partition (ext4 file system).
    • Optionally create a swap partition.
  • Format the partitions:
    mkfs.ext4 /dev/sda1  # Adjust according to your partition
    mkswap /dev/sda2     # If you created a swap partition
    

Step 7: Mount Filesystems

  • Mount the root partition:
    mount /dev/sda1 /mnt
    
  • If using swap, enable it:
    swapon /dev/sda2
    

Step 8: Install the Base System

  • Run the following command to install the base packages:
    pacstrap /mnt base linux linux-firmware
    

Step 9: Configure the System

  • Generate the file system table:
    genfstab -U /mnt >> /mnt/etc/fstab
    
  • Change root into the new system:
    arch-chroot /mnt
    

Step 10: Install the Bootloader

  • Install GRUB:
    pacman -S grub
    
  • Install GRUB to the disk:
    grub-install --target=i386-pc /dev/sda
    grub-mkconfig -o /boot/grub/grub.cfg
    

Step 11: Reboot into the Installed System

  • Exit the chroot environment:
    exit
    
  • Unmount the partitions:
    umount -R /mnt
    
  • Reboot the system:
    reboot
    

Step 12: Verify Internet Connection

  • Upon rebooting, check if you have internet access using:
    ping -c 3 google.com
    

Step 13: Create a User Account

  • Create a new user:
    useradd -m -G wheel username
    passwd username
    
  • Enable sudo for the user by editing the sudoers file.

Step 14: Install Additional Packages

  • Install a server and graphics drivers as needed:
    pacman -S xorg-server xf86-video-intel  # Example for Intel
    

Step 15: Install Desktop Environment (Deepin)

  • Install the Deepin desktop environment:
    pacman -S deepin
    

Step 16: Install a Display Manager (LightDM)

  • Install LightDM:
    pacman -S lightdm lightdm-gtk-greeter
    
  • Enable LightDM to start on boot:
    systemctl enable lightdm
    

Conclusion

Congratulations! You have successfully installed ArchLinux and configured it with a desktop environment. To continue, explore customizing your system further or delve into package management using pacman. Enjoy your journey with ArchLinux!