Arch linux installation guide - 404oops edition

·

3 min read

Welcome to this tutorial.

Today we're installing Arch Linux my way. It's not hard, you just have to be patient enough.

These are the dependencies that you'd have to acknowledge when installing:

  • One empty disk
  • No shortcuts
  • an UEFI (or an efi compatible system)
  • and an internet connection

If you have WiFi, follow this part:

Connect the computer to an internet source that's either Temporary LAN or USB tethering

then run:

pacman -Sy networkmanager; systemctl start NetworkManager

to connect to WiFi:

nmtui

There, you go to add a connection and find your WiFi network, connect to it and then disconnect the USB/LAN cable

Step 1: Partitioning a disk

Most common disk names start with /dev/sd*. Some start with /dev/nvme*n* but the process is similar

Run lsblk to identify your disk. You can do it via size, partitions and more

we're going to use /dev/sda for this tutorial

Once you identified your disk device, run cfdisk /dev/sda

Create 2 partitions (delete if any visible and then write):

/dev/sda1: 128M, select Type on the bottom bar and select the top most option (EFI boot)

/dev/sda2: xGB (depending on the size, this is variable), leave the Linux Filesystem type as is

Formatting is going to look like this:

mkfs.fat -F32 /dev/sda1
mkfs.btrfs /dev/sda2

Step 2: Mounting

mount /dev/sda2 /mnt
mkdir /mnt/boot
mkdir /mnt/boot/EFI
mount /dev/sda1 /mnt/boot/EFI

These are the 4 commands that you use to mount your disks.

Step 3: Installing packages

First you have to determine which packages are the most necessary ones for your system. They're going to be a simple package list that goes as follows:

  • a Desktop Environment (like cinnamon) and a display manager (like lightdm)
  • Display drivers (DO NOT USE NOUVEAU FOR NVIDIA GRAPHICS CARDS, IT'S TOO SLOW)
  • linux <- the Kernel itself
  • base and linux-firmware
  • a bootloader (grub and efibootmgr)
  • networkmanager and more network utilities if you wish
  • base-devel for installing AUR packages
  • and a text editor, vim

to do this, just run this command:

pacstrap /mnt base linux-firmware cinnamon networkmanager base-devel grub efibootmgr vim mesa

Keep in mind that this comand varies per computer and per user so edit it how you want/need it to be

When it finishes, run this command:

arch-chroot /mnt

This will make your operating system configurable

Step 4: Configuring the OS

First of all, let's change the password of the root user:

passwd

Then let's create a user, put him into wheel, change its password and allow sudo to run commands as root from any user within wheel without a password:

useradd -m --badnames 404oops; usermod -aG wheel
passwd 404oops
ln -s /usr/bin/vi /usr/bin/vim
visudo

Why did I choose vim? For the quick search function. When you open visudo, you're going to type in:

/#%wheel

and uncomment the NOPASSWD line by pressing i and removing it.

psst, to exit vim, press escape and type in :wq

Let's change the system locale:

do

vim /etc/locale.gen

then search up the english locale with:

/#en_US

Press i and then remove the # from the lines that contain en_US

then we're going to change the system language to english:

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

then we're going to enable the NetworkManager service:

systemctl enable NetworkManager # keep in mind that this is **case-sensitive**

Let's change the time:

timedatectl set-timezone Europe/Belgrade

where Europe is your continent and Belgrade is your city

and then enable the desktop manager service:

systemctl enable lightdm

Step 5: Making your system bootable

Let's install GRUB!

grub-install --efi-directory=/boot/EFI --boot-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg

Step 6: Reboot!

You're done with your simplest arch installation ever! This is usually the way I install my system, and it works great!

Now you're on your own. If you need help, consult the Arch forums, discord servers or the Arch Wiki.