Minimal Requirements

  • 64bit machine
  • 512MB of RAM (4GB recommended)
  • 2GB of free disk space (64GB recommended)
  • Internet Connection
  • USB flash drive (for the physical machine installation)
  • VirtualBox Installed (for the virtual machine)

Download Arch Linux

Download the latest version of Arch Linux from the official website https://www.archlinux.org/download

Create a Live USB (for the physical machine installation)

This step is only needed if you install on a machine.

Replace /path/to/archlinux.iso with the path to the downloaded ISO file and /dev/sdx with your USB drive name.

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Create a VirtualBox Machine

Open VirtualBox

Click New and make sure the new screen looks like this

Click Continue and make sure the new screen looks like this

Click Continue

Click Create

Click Continue

Click Continue and make sure the new screen looks like this

Click Create

Select the newly created Virtual Machine and click Settings, and go to Storage tab.

From the Storage Devices tree select the row that says Empty under Controller: IDE.

Click on the CD icon at the right of Attributes > Optical Drive. And click on Choose Virtual Optical Disk File...

Image for post
Image for post

Select the Arch Linux ISO and click Open

The Settings screen should look like this

Start the machine

If you are installing on a Virtual Machine just start it. If you are installing on a physical device, put in the USB drive, turn on the device, go to BIOS and make sure it loads from USB and continue the startup process.

Installation Step By Step

Boot Arch Linux (x86_64)

Image for post
Image for post

Start process

After some time you will get a root prompt

Image for post
Image for post

Check Internet Connection

ifconfig
ping google.com -c 2
Image for post
Image for post

If your system does not get a reply, then configure a static IP address on your system so that your system can connect to the internet to download packages.

ip addr flush dev enp0s3
ifconfig enp0s3 192.168.1.100 netmask 255.255.255.0
route add default gw 192.168.1.1
echo "nameserver 192.168.1.1" >> /etc/resolv.conf
echo "nameserver 8.8.8.8" >> /etc/resolv.conf

Replace the network card and IP address according to your environment.

Partition Disk

clear
fdisk -l
Image for post
Image for post
clear
fdisk /dev/sda
Image for post
Image for post

Type p

Image for post
Image for post

Type n

Image for post
Image for post

Type p

Image for post
Image for post

Hit Enter

Image for post
Image for post

Hit Enter

Image for post
Image for post

Type +500M and hit Enter

Image for post
Image for post

Type n

Image for post
Image for post

Type p

Image for post
Image for post

Hit Enter

Image for post
Image for post

Hit Enter

Image for post
Image for post

Type +8G and hit Enter

Image for post
Image for post

Type t

Image for post
Image for post

Type 2

Image for post
Image for post

Type 82

Image for post
Image for post

Type n

Image for post
Image for post

Type p

Image for post
Image for post

Hit Enter

Image for post
Image for post

Hit Enter

Image for post
Image for post

Hit Enter

Image for post
Image for post

Type w

Image for post
Image for post

Create a File System

mkfs.ext2 /dev/sda1
mkfs.ext4 /dev/sda3
mkswap /dev/sda2

Mount Partitions

mount /dev/sda3 /mnt
swapon /dev/sda2

Install Arch Linux Base System

pacstrap /mnt/ base base-devel

Create fstab

genfstab /mnt >> /mnt/etc/fstab

Arch Linux System Configuration

arch-chroot /mnt

Set System Language

vi /etc/locale.gen

Uncomment en_US.UTF-8 UTF-8 and save the file

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

Set Timezone

ln -sf /usr/share/zoneinfo/US/Central /etc/localtime
hwclock --systohc --utc

Set Hostname

echo "archlinux.host.local" > /etc/hostname

Set Root Password

passwd

Install GRUB Boot Loader

pacman -S grub
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Enable dhcpcd (internet connection)

systemctl enable dhcpcd

Create your user and add to the “wheel” group

useradd -m -G wheel username
passwd username

Enable sudo for the “wheel” group

EDITOR=nano visudo

Find this line # %wheel ALL=(ALL) ALL and uncomment it (remove the leading #). Save the file with Ctrl+O and exit with Ctrl+X.

Reboot

Eject USB or VirtualBox CD and then reboot to your system.

exit
reboot

Congratulations!

After reboot, you can sign in with your user and enjoy your fresh Arch Linux install.

Written by

Only practical stuff for programmers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store