Arch Linux is a general purpose GNU/Linux based operating system which follows the rolling release model, which keeps the system up-to-date with the latest software. The design approach of Arch Linux is based on KISS Principle(Keep It Simple, Stupid) which focuses on elegance, code correctness, minimalism and simplicity, and expects the user to be willing to make some effort to understand the system’s operation. More information can be found on the Wikipedia page. Without further ado, lets get started.
I would personally recommend grabbing a USB pendrive, minimum 1 GB of size. Download the latest Arch Linux ISO file. Then, create a bootable USB drive with the following command:
dd bs=4M if=/path/to/archlinux.iso of=/dev/sdX status=progress oflag=sync
Remember to replace X with your device ID and Do not append partition number to the command. You can list available device using
fdisk -l command.
After successfully creating the bootable drive, boot into the USB. You will be automatically logged into the
root account of
archiso. Follow the steps below to proceed with the installation:
Assuming you are on a UEFI based system[^1], connect to the internet. If you have a LAN connection, you can skip this step. Otherwise, you can connect to your wireless network using:
Test the connection using
ping archlinux.org command.
timedatectl set-ntp true
fdisk provides a great interface for this purpose. Identify your hard drive on which you wish to install Arch Linux using
fdisk -l and partition that drive using the following command:
Remember, you should’nt include any partition number as mentioned earlier. This command will take you to the
fdisk shell. Type
m to view help. More information can be found here.
Minimum two partitions are required, one for EFI System Partition with mount point
/boot, whereas the other for the
root partition with mount point
/. If dual-booting Arch Linux with Windows, please see [^note]. A
swap partition is optional, but recommended. You can refer to this table for deciding on the size. A
swap file is more flexible way of creating this. We will cover the creation of swap file in the upcoming sections.
Ext4 is a stable and reliable filesystem. To format your partitions with
ext4, run the following command, replacing
N with the partition number:
mkfs.ext4 /dev/sdXN # Replace X with device number and N with partition number
We will create and mount the
swap file during mounting stage.
First, mount your
root partition to
mount /dev/sdXN /mnt
Next, create a
boot folder inside
/mnt to mount the EFI System partion:
Follow the same steps for any other remaining partitions. For example, if you wish to mount another partition to
/home, just run:
Remember to substitute the appropriate values for
Finally, create the swap partition and mount it[^2] :
fallocate -l size /mnt/swapfile
where size can be
512M for 512 MB,
2G for 2 GB and so on.
Simple run the following to install a working base system:
pacstrap /mnt base base-devel
genfstab -U /mnt >> /mnt/etc/fstab
/mnt/etc/fstab to remove the
/mnt entry prefixed in the swap field.
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
Uncomment required locales in
/etc/locale.gen and run:
hostname file and matching entries in hosts:
netctl dependencies and enable
pacman -S dialog wpa_supplicant
If you are planning to install full-blown Desktop Environments like
KDE, skip this step, else:
pacman -S wpa_actiond ifplugd
You can get the
interface value for respective devices by running
ip addr show.
pacman -S intel-ucode
Assuming you are install Grub:
pacman -S grub efibootmgr os-prober
Umount all mounted partitions:
umount -R /mnt
Remove the installation media, enter your BIOS setup, make necessary changes to boot sequence, save and exit. You will now be booted into your freshly installed Arch Linux 😃
Necessary configurations and tasks related to getting a working system such as creating user, installing Xorg, configuring drivers, etc will be covered in the second part of the post.
Till then, stay tuned! Link to the follow-up post: Part 2
[^1]: Most of the modern systems are UEFI based.
[^2]: If you are using other filesystems except ext, please verify the compatibility of swap partition.
[^note]: For dual-booting with windows, you don’t need to create an EFI System Partion. Simply mount the Windows boot drive(generally formatted as FAT32) to
/boot. Do not format this partition, else you will loose Windows boot data.