How do I install Arch with minimal pain?

How to install Arch without pain ??



Foreword



I've heard that some people find Arch difficult to install. They're partly right, but for anyone who can figure out how to install and configure linux, installing Arch is pretty straightforward. It is also the most flexible distribution, so you can customize it better than other distributions.



This guide is a composite hodgepodge of all the guides that I have read (both Russian and foreign). Its goal is to show you a step-by-step installation of Arch and do it in Russian, simply and without unnecessary technical information . The main thing is that the article was written from the non-understanding for the non-understanding. I will say in advance that some screenshots will already be from the installed Arch , but this in no way changes the work of the commands and what you will see when using them.



So let's start simple.



Go to the site and download the ISO file:





There we are looking for a mirror (most likely Russian) and download the image:





To simplify further life, it is better to download Etcher , right on the site there is a pretty clear instruction in pictures, so everyone can handle it.



 Installation



// VirtualBox, ,



1. :



2. '' EFI'':





3. , IDE



.







Enter



:



, Arch .



.



ping -c 3  google.com




wifi , :



wifi-menu


:







, , . USB  HDD\SSD .



( ):



lsblk




, - , .



fdisk -l




. cfdisk gpt :



cfdisk /dev/sda




B! lsblk fdisk sda , , , sdb.



3 :



  • /dev/sda1 # 1G UEFI
  • /dev/sda2 # 10-15 GB root
  • /dev/sda3 # home


PS: ,



lsblk . , /dev/sda 3 .






.



  1. , UEFi



    mkfs.fat -F32 /dev/sda1


  2. root



    mkfs.ext4 /dev/sda2


  3. home



    mkfs.ext4 /dev/sda3




root home:



mount /dev/sda2 /mnt
mkdir /mnt/home
mount /dev/sda3 /mnt/home


lsblk





, . , nano, .  vim ( ).



pacstrap -i /mnt base linux linux-firmware sudo nano


all yes. , , , .



 fstab



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


 



Chroot



Chroot (change root) ,  root ( ).



arch-chroot /mnt /bin/bash






,



nano /etc/locale.gen




#en_US.UTF-8 #, . PS: Ctrl + W .



Ctrl + O, Enter Ctrl + X, Enter



, locale.conf .



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




ln -sf /usr/share/zoneinfo/


2 Tab , .



:



ln -sf /usr/share/zoneinfo/Europe/Kaliningrad /etc/localtime




2 . , .



hwclock --systohc --utc
date




ArchMe, :



echo ArchMe > /etc/hostname


localhosts ip.  ip , .



nano /etc/hosts
127.0.1.1 localhost.localdomain ArchMe




.



pacman -S networkmanager
systemctl enable NetworkManager 


GRUB



root :



passwd


GRUB — , , ( EFI). , .



pacman -S grub efibootmgr
mkdir /boot/efi
mount /dev/sda1 /boot/efi
lsblk #       
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi --removable
grub-mkconfig -o /boot/grub/grub.cfg




:



exit
umount -R /mnt
reboot


. , GRUB







root  swapfile (- )



fallocate -l 3G /swapfile


:



chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab


, swap:



free -m




useradd -m -g users -G wheel -s /bin/bash username
passwd username


username , )



:



EDITOR=nano visudo


there we look for and remove #, and then Ctrl + O , then Enter and Ctrl + X , then Enter



# %wheel ALL=(ALL) ALL


Firewood


pacman -S pulseaudio pulseaudio-alsa xorg xorg-xinit xorg-server


You will be offered a choice, choose based on your schedule.



Environment


First, I'll show you how to install a fairly simple XFCE



pacman -S xfce4 lightdm lightdm-gtk-greeter
echo "exec startxfce4" > ~/.xinitrc
systemctl enable lightdm


And my favorite i3, there we select packages 2 4 5. You may see squares instead of symbols, but that's ok, you just need to download the font dejavu ( pacman -S ttf-dejavu). The list of hotkeys can be found   here



echo "exec i3"  > ~/.xinitrc
sudo pacman -S i3




If you decide to change your environment, you will need to change the entry in the xinitrc file .



To start your environment use



startx



All Articles