Skip to content

Instantly share code, notes, and snippets.

@TrueMyst
Last active October 19, 2023 07:32
Show Gist options
  • Save TrueMyst/a4b5536a18b396906d38f54b9fd64414 to your computer and use it in GitHub Desktop.
Save TrueMyst/a4b5536a18b396906d38f54b9fd64414 to your computer and use it in GitHub Desktop.
Simple Arch Installation by TrueMyst

⚡ Setting up ISO mirrors for faster downloads

$ sed -i  's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
$ sudo reflector --verbose --latest 10 --protocol https --download-timeout 60 --sort rate --save /etc/pacman.d/mirrorlist

⌨️ Setting up the keyboard layout

$ loadkeys us

📦 Create and format partitions

$ cfdisk /dev/sda
  • Make 1G partition for bootefi
  • Make 8G partition for swap
  • Make the 3rd partition with the rest of the space available
  • Write and Quit
$ mkfs.fat -F 32 /dev/sda1
$ mkswap /dev/sda2
$ mkfs.ext4 /dev/sda3

🚴 Mount partitions

Mount the drives that you've just created:

$ mkdir -p /mnt/boot/efi
$ mount /dev/sda1 /mnt/boot/efi
$ swapon /dev/sda2
$ mount /dev/sda3 /mnt

🚴 Mount your external hardrive, if you want to:

$ mkdir -p /mnt/TOSHIBA
$ mount /dev/sdb /mnt/TOSHIBA

✨ Pacstrap

$ pacstrap -K /mnt base base-devel linux-zen linux-zen-headers linux-firmware sof-firmware pacman-contrib efibootmgr intel-ucode grub networkmanager reflector vim man git

🍀 Generate fstab

$ genfstab -U /mnt > /mnt/etc/fstab
$ cat /mnt/etc/fstab

⛩️ Chroot into the installation directory

$ arch-chroot /mnt
$ ln -sf /usr/share/zoneinfo/Asia/Dhaka /etc/localtime
$ hwclock --systohc
$ timedatectl set-ntp true
$ vim /etc/locale.gen
> uncomment "en_US.utf-8 utf-8" line
$ locale-gen
$ vim /etc/locale.conf
> add the line "LANG=en_US.UTF-8"
$ vim /etc/hostname
> add the line "arch"
$ vim /etc/hosts
> add these lines
"""
127.0.0.1     localhost
::1           localhost
127.0.1.1     arch.localdomain    arch
"""
$ passwd
> enter your root password
$ pacman -Syu xdg-utils xdg-user-dirs

📪 Install grub bootloader

$ grub-install /dev/sda
$ vim /boot/grub/grub.cfg
> change the grub timeout to "GRUB_TIMEOUT=2"
$ grub-mkconfig -o /boot/grub/grub.cfg

📮 Enable network manager and reflector

$ systemctl enable NetworkManager
$ systemctl enable reflector.timer

🚶🏻 Add user to the system

Replace username with your preferred name.

$ useradd -mG wheel username
$ passwd username
> create user password
$ EDITOR=vim visudo
> uncomment this line.
"""
%wheel ALL=(ALL) ALL
"""

🔁 Restart the system

$ exit
$ umount -R /mnt
$ reboot

📦 Enable multilib for Pacman

$ vim /etc/pacman.conf
> uncomment these lines.
"""
[multilib]
Include = /etc/pacman.d/mirrorlist
"""

🏓 Install paru

$ cd Downloads
$ git clone https://aur.archlinux.org/paru.git
$ cd paru
$ makepkg -si

🖥️ Install KDE

sudo paru -S ark bluedevil dolphin gwenview kcalc kate kdeconnect kde-gtk-config khotkeys kinfocenter kinit kio-fuse konsole kscreen kwallet-pam okular plasma-desktop plasma-disks plasma-nm plasma-pa powerdevil print-manager sddm-kcm spectacle vlc xsettingsd klipper noto-fonts-cjk noto-fonts-emoji noto-fonts kcodecs kcoreaddons kdeplasma-addons breeze-gtk

Congratulations you've Arch installed in your system :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment