Arch Linux Installation & Configuration Guide

Configurare noua (How To)

Situatie

1. Boot into Arch ISO

  1. Boot from USB and select the Arch Linux option

  2. Confirm internet connection:

    bash
    ping archlinux.org

2. Set Keyboard Layout (if needed)

bash
loadkeys us # or your layout, e.g., de, fr, etc.

3. Update System Clock

bash
timedatectl set-ntp true

4. Partition the Disk

Use fdisk or cfdisk (UEFI example):

bash
cfdisk /dev/sdX

Create:

  • EFI System Partition (e.g. 512M, type: EFI System)

  • Linux filesystem partition

5. Format Partitions

bash
mkfs.fat -F32 /dev/sdX1 # EFI
mkfs.ext4 /dev/sdX2 # Root

6. Mount Partitions

bash
mount /dev/sdX2 /mnt
mkdir /mnt/boot
mount /dev/sdX1 /mnt/boot

7. Install Base System

bash
pacstrap -K /mnt base linux linux-firmware nano

8. Generate fstab

bash
genfstab -U /mnt >> /mnt/etc/fstab

9. Chroot into New System

bash
arch-chroot /mnt

10. Set Timezone

bash
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc

11. Localization

Uncomment your locale in /etc/locale.gen, e.g., en_US.UTF-8 UTF-8, then:

bash
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf

12. Set Hostname and Hosts File

bash
echo "myhostname" > /etc/hostname

Edit /etc/hosts:

plaintext
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname

13. Set Root Password

bash
passwd

14. Install Bootloader (Systemd-boot for UEFI)

bash
bootctl install

Create loader config:

bash
nano /boot/loader/loader.conf
ini
default arch
timeout 3
console-mode max
editor no

Create entry:

bash
nano /boot/loader/entries/arch.conf
ini
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=PARTUUID=xxxxxx rw

Get PARTUUID:

bash
blkid /dev/sdX2

15. Enable Networking

bash
pacman -S networkmanager
systemctl enable NetworkManager

16. Add a User

bash
useradd -mG wheel yourusername
passwd yourusername

Enable sudo for wheel group:

bash
EDITOR=nano visudo
# Uncomment: %wheel ALL=(ALL:ALL) ALL

17. Install Essential Packages

bash
pacman -S base-devel git curl

18. Install a Desktop Environment (Optional)

Example: GNOME

bash
pacman -S gnome gdm gnome-tweaks
systemctl enable gdm

Or KDE:

bash
pacman -S plasma kde-applications sddm
systemctl enable sddm

Or XFCE:

bash
pacman -S xfce4 xfce4-goodies lightdm lightdm-gtk-greeter
systemctl enable lightdm

19. Exit, Unmount, and Reboot

bash
exit
umount -R /mnt
reboot

Remove installation media when rebooting.

Solutie

Tip solutie

Permanent

Voteaza

(4 din 8 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?