This guide is made in such a way that users may find it helpfull / userfriendly and can follow along with the installation steps and can install Arch-Linux on thier systems.
Warning : Any data-loss or system brick by using this guide I / geeknozy will / should not be held responsible. This guide will only provide confusion free steps to install Arch-Linux and might differ what is shown in other tutorials, so as to say : Read the official Arch wiki, it is one of the greatest documentation ever.
Step 1: Go to https://archlinux.org
Step 2: On the right top corner click on download button which will redirect you to the download page.
Step 6: Use CLI-DD(in Linux) / RUFUS-DD or Balena-Etcher to write the ISO to the USB-Stick (note the data in USB will be lost)
-
NOTE: you might have to disable secure boot inorder to boot into arch-live USB
Step 10: Follow this link for Partition : https://github.com/geeknozy/disk-partition-guide-on-linux-for-installation
mounting root partition to /mnt of the iso (all packages will be downloaded here).
here in below mount command theX
in sdX is the letter of your partition depending on your h/w eg :sda or sdb or sdc
mount /dev/sdX2 /mnt
creating seperate efi directory to mount efi partition
mkdir -p /mnt/boot/efi
mounting efi partition
mount /dev/sdX1 /mnt/boot/efi
pacstrap /mnt base base-devel linux linux-headers linux-firmware nano intel-ucode
pacstrap /mnt base base-devel linux-lts linux-lts-headers linux-firmware nano intel-ucode
pacstrap /mnt base base-devel linux-zen linux-zen-headers linux-firmware nano intel-ucode
This will take some time to download and install base, kernel and included packages based on mirrors / server speed and your internet speed.
genfstab -U /mnt >> /mnt/etc/fstab
type below command to check the generated fstab
cat /mnt/etc/fstab
now you have to see that your command prompt change.
arch-chroot /mnt
get your timezone if you are not aware how, using below command
timedatectl list-timezones | grep your-country-name or timezone name
using below command get your time zone here the
YourRegionName
might be your country name or region depending on where you arezonename
will be your City or your locality
ln -sf /usr/share/zoneinfo/YourRegionName/zonename /etc/localtime
for example below:
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
hwclock --systohc
nano /etc/locale.gen
-
find for line with
#en_US.UTF-8 UTF-8
(this is for english) or your locale format -
uncomment that line by removing
#
at the begening of the line. -
save the file (ctrl+o) and exit nano editor (ctrl+x)
-
type below command to generate your locale
locale-gen
once executed type below command to add genrated locale to your conf file.
nano /etc/locale.conf
add your locale formate to the config file
LANG=en_US.UTF-8
save and exit the file
type below command to set host name
nano /etc/hostname
add your desired name for the system and save and exit file.
next to configure localhost and internet.
nano /etc/hosts
- add these lines after first two heading lines
127.0.0.1 localhost
::1 localhost
127.0.1.1 hostname.localdomain hostname
- mkinitcpio is a Bash script used to create an initial ramdisk environment
mkinitcpio -P
wait for mkinitcpio execution to complete
- this is to set root user password so create strong password and confirm.
passwd
pacman -S grub efibootmgr networkmanager network-manager-applet git pulseaudio alsa-utils
pacman -S grub efibootmgr networkmanager network-manager-applet git pipewire pipewire-pulse pipewire-alsa alsa-utils
Note: use wireplumber for media session service instead pipewire-media-session (personal preference)
for other packages accept defaults and download - install packages.
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch
once the grub is installed you should check that no erros are reported which will be shown after execution once done then generate config for grub by sending output of grub-mkconfig to the grub.cfg file using below command
grub-mkconfig -o /boot/grub/grub.cfg
systemctl enable NetworkManager.service
useradd -mG wheel username
NOTE: here username can be your choice
- after the above command type below command to set password to created user
passwd username
NOTE: here username is the user name which you have given above while creating user
EDITOR=nano visudo
- Find the line named under wheel group.
#wheel ALL=(ALL) ALL
uncommment that line (remove # symbol) - save and exit.
exit
- after exit command type below command to unmount mounted partitions for safer reboot.
umount -R /mnt
reboot
- if you get greeted by grub then you successfully installed base Arch Linux.