Installing Arch Linux

Arch Linux is for those people who want to build their system from scratch. It’s like building your own home, from foundation to roof. The Linux Arch installation is unlike other popular Linux distributions, it doesn’t come with a pre-built installer. In this post, we will show you how to install Arch Linux using the Linux command line.

Download Arch Linux ISO from Arch Linux official website, burn it to a CD or make bootable USB

Installing Arch Linux

After booting from ArchLinux, you should see a screen like this

Select “Boot Arch Linux (x86_64)”

It will automatically login live

Now follow the instructions to install Arch Linux

Create disk partition

cfdisk /dev/sda

A typical disk partition should look like this, shown in the screenshot

Partitioning disks in Arch Linux

Create filesystem and create swap partition

# mkfs.ext4 /dev/sda1
# mkswap /dev/sda2
# swapon /dev/sda2

Mount / dev / sda1 partition in live OS

# mount /dev/sda1 /mnt

Installing basic OS packages

# pacstrap /mnt base base-devel

Login to the mounted file system, configure and set a password.

# arch-chroot /mnt
# passwd
# nano /etc/locale.gen
# locale-gen
# ln -s /usr/share/zoneinfo/... /etc/localtime
# echo vbox > /etc/hostname

Replace the ellipsis with your zone.

Installing and configuring the bootloader

# pacman –S grub os-prober
# grub-install /dev/sda
# os-prober
# mkinitcpio -p linux
# grub-mkconfig –o /boot/grub/grub.cfg
# exit

Now create FSTAB

# genfstab /mnt >> /mnt/etc/fstab

Unmount the filesystem and reboot the system

# umount /mnt
# reboot

After booting the OS from the hard drive, you must configure the network setup. Arch Linux will not automatically configure the network. Hence, you must configure it manually.

Check the assigned network interface and create an interface file with the same name

# ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1; 
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000; 
link/ether 23:e1:34:56:54:19 brd ff:ff:ff:ff:ff:ff

# cp /etc/netctl/examples/ethernet-static /etc/netctl/ens18

Setting up the interface file ‘/ etc / netctl / ens18’, the complete configuration should look like this:

## For IPv4 static address configuration
 Interface=ens18
 Connection=ethernet
 IP=static
 Address=('25.0.10.30/8')
 Gateway=('25.0.10.254')
 DNS=('25.0.10.1')

Start and enable network service

# netctl start ens18
# netctl enable ens18

Congratulations! Your system is now ready to use. You can now start installing the required software.

Installing Arch Linux

Sidebar