How To Install Arch Linux

Installation and Configuration of Arch Linux

Arch Linux is a GNU based Linux distribution. It is not recommended for Linux beginners due to the complicated command line installer. It provides its software packages through Pacman (Package Manager). Installation and configuration of Arch Linux is explained in this article.

To Create Disk Partitions Layout

Download Arch Linux from its official website. Create a bootable CD/USB and plug it into your system CD/USB drive. Now choose your CPU Architecture type and then press Enter.

Verify your network connection by using the ping command.

root@archiso~ # ping  google.co.in


Check the hard disk information.

root@archiso~ # fdisk &ndash l

Use Cfdisk utilities to perform a disk partition and select the label type accordingly.

root@archiso~ # cfdisk

Use the following structure for a basic layout partition table

Root partition

Device /dev/sda1
Size 10G as Primary with Boot flag, ext4 formatted.

Swap partition

Device /dev/sda2
Size 2xRAM as Primary, Swap On.


Now start to create the partitions. Select Free Space then hit on New.

Enter partition size in GB and then create partition at the Beginning of Free Space. Here, we are setting the main partition size as 10gb and select primary

Then set bootable to that main partition.

Select “ write” and type " yes" to add the partition.


Use arrow key to select Free Space then repeat the same steps as above to create swap partition.

Select “ quit” for closing the partition window. Run " fdisk &ndash l" command to view the partition table.

root@archiso~ # fdisk -l

Run the following command to create disk file system and also format the main partition with ext4.

root@archiso~ # mkfs.ext4 /dev/sda1

To Format and initialize SWAP partition, run the following command.

root@archiso~ # mkswap /dev/sda2
root@archiso~ # swapon /dev/sda2


Installation of Arch Base System

In order to perform an Arch Linux installation, you must mount the two partitions created on Arch Live running system to the mount point. Here we are using the /mnt as the mount point.

root@archiso~ # mount /dev/sda1 /mnt

Install Arch Linux by running the following command and then press Enter on both packages selection.

root@archiso~ # pacstrap  /mnt base base-devel

The installation process is started.

Generate fstab file for our Arch Linux system to boot from new partitions by running the following command.

root@archiso~ # genfstab  /mnt > >  /mnt/etc/fstab

If any error occurs, open and edit fstab to boot properly.

root@archiso~ # cat /mnt/etc/fstab

Machine Configuration

To configure Arch Linux, move to the /mnt path and issue the /bin/bash shell interpreter, to get rid of the shell.

root@archiso~ # arch-chroot /mnt  /bin/bash

First configure System Language and choose your preferred encoding languages from /etc/locale.gen file by running the following command.

root@archiso~ # vi /etc/locale.gen


Once the locale-gen file opened, find your local language zone and enable it by removing # symbol.

Then save and quit.

Now configure your system time zone by running the following command.

root@archiso~ # locale-gen

Create locale.conf file.

root@archiso~ # vi /etc/locale.conf

Add following line into it.

LANG=en_US.UTF-8

List all the time zone and create soft link for your sub time zone from /usr/share/zoneinfo/Continent/Main_city to /etc/localtime path.

root@archiso~ # ls /usr/share/zoneinfo/
root@archiso~ # ln -s /usr/share/zoneinfo/Asia/Kolkata   /etc/localtime

You can configure hardware clock to use UTC.

root@archiso~ # hwclock --systohc &ndash utc

Add password for root account by running the following command.

root@archiso~ # passwd

First enable DHCP and install boot loader by running the following command.

root@archiso~ # systemctl enable dhcpcd
root@archiso~ # pacman &ndash S grub os-prober

Run “ grub-install" command to complete the grub installation.

Exit chroot environment and unmount your partitions by running the following command.

root@archiso~ # exit
root@archiso~ # umount /mnt

Finally reboot your system to apply changes.

root@archiso~ # reboot

After your system reboots, enter the user credentials to login to Arch Linux.

Now your machine contains a minimal installation, which is fully functional to receive and install new software packages in command line.

Tag : Arch Linux
FAQ
Q
What architectures does Arch support?
A
Arch only supports the x86_64 (sometimes called amd64) architecture
Q
Is Arch designed to be used as a server? A desktop? A workstation?
A
Arch is not designed for any particular type of use. Arch can be used both their desktops and workstations
Q
Why should a static IP be preferred over 127.0.1.1 in /etc/hosts under host configuration on ARCH Linux installation?
A
If a system has a permanent IP address, it should be used instead of 127.0.1.1.
Q
What about network configuration on ARCH Linux then?
A
Interface for ethernet and other loopback should also be configured via command line.
Q
Where you will have permanent mount points for external devices after ARCH Linux installation?
A
That file has to created via installation by genfstab /mnt >> /mnt/etc/fstab for ARCH Linux