A Step-by-step guide to install Archlinux.
September 06, 2016
This is a Step-by-step tutorial for installing Arch Linux.
A Linux distro which is commonly considered for power users. It provides a lot of customisation right from the installation process. Its very light-weight distro, and it install very few core packages at the time of installation. Also one get all the latest packages as Arch Linux is rolling release distro. Also Arch users get access to Arch User Repository aka AUR which is a comprehensive repository with tons of packages. One can say that AUR contain all the packages that you can find on any other distro.
But the installation process is little complicated as you don’t get any GUI installer instead you’ve to install it from command line only. So, here’s the step by step guide to install Arch Linux on your machine.
Download the Arch Linux iso from here.
Note: The iso is common for both 64 bit and 32 bit.
Burn the iso into a CD or make a bootable usb from the iso downloaded and boot from it.
Choose your architecture from the boot menu.
$ ping google.com
$ fdisk -l
$ cfdisk /dev/sdx
Caution: This will erase all the data on that disk, choose wisely. I’m using “x” in sdx, you can replace it with variable corresponding to your disk.
Create one root partition, one swap partition, and more if you need them.
Make root partition bootable and change swap partition type to Linux Swap.
Write and quit
$ mkfs.ext4 /dev/sdx1
$ mkswap /dev/sdx2
$ swapon /dev/sdx2
$ mount /dev/sdx1 /mnt
Note: Mount all other partitions if any.
$ pacman -Sy
$ pacstrap -i /mnt base base-devel
$ genfstab -U -p /mnt >> /mnt/etc/fstab $ cat /mnt/etc/fstab
$ arch-chroot /mnt
$ ls /usr/share/zoneinfo/ $ cd /usr/share/zoneinfo/REGION $ ls
$ ln -s /usr/share/zoneinfo/REGION/CITY /etc/localtime $ hwclock --systohc --utc
$ nano /etc/locale.gen
Note: Uncomment your specific localization.
$ locale-gen $ echo LANG=en_US.UTF-8 > /etc/locale.conf
Replace en_US.UTF-8 with the one you uncommented previously.
echo HOSTNAME > /etc/hostname
Replace HOSTNAME with your hostname.
$ systemctl enable [email protected]
$ mkinitramfs -p linux
$ pacman -S grub os-prober $ grub-install -target=i386-pc -recheck /dev/sdx1 $ grub-mkconfig -o /boot/grub.cfg
$ umount -R /mnt