Arch Linux Installation and Post Install Customization

Arch Linux Installation and Post-Install Customization

After using Fedora for 7 years, I wanted a change. I was looking for something lightweight, fast, and honestly… something that feels a bit more “geeky”. That is when I moved to Arch Linux.

It is minimal, bloat-free, and fully DIY. You build your system exactly how you want it.

This is my complete installation and post-install workflow.

1. Pre-Installation Preparation

It all starts with downloading the ISO and creating a bootable media

sudo dd if=/path_to_arch.iso of=/dev/sdX

Now that you have the media, you need working Ethernet connection, you can use wireless if you can configure WPA2 and connect from terminal. I just took the easy way with ethernet. Note: you can also download the files and use from USB, Check it in wiki here. However without working internet connection, you won’t just feel the benifits of Arch Linux.

You can test your connection by running

ping -c 3 smjrifle.net

2. Disk Partitioning

Next Step is to prepare your partition, you can create partition from other linux distribution and use it here, however since I missed geekiness of connecting wireless connection, I had to do this.

Note: If you are booting from CD, your hard disk is sda, if your booting from USB, it can be sdb or sdc.

you can check your Partitions using

fdisk -l

Or use a more interactive tool:

cfdisk /dev/sda

Create at least:

  • Root partition
  • Swap partition

Once your partitions are ready, format them. Make sure you note the correct partition numbers for root and swap.

Replace X and Y with your actual partition numbers (for example: /dev/sda1, /dev/sda2)

# Format root partition (minimum recommended: 50GB)
mkfs.ext4 /dev/sdaX

# Create swap partition (minimum recommended: 4GB)
mkswap /dev/sdaY

# Enable swap
swapon /dev/sdaY

3. Time to install the base system

Lets mount your root partition,

mount /dev/sda1 /mnt

Lets install the base and developer’s packages now

pacstrap -i /mnt base base-devel

Important: Run the command below only once even if it gives error

genfstab -U -p /mnt >> /mnt/etc/fstab

Now check if the fstab has the correct partition, else you won’t boot. I ran into problems while using vi/vim so I am using nano. You can Save by pressing ctrl+x; Press Y to save or N to Discard then pres enter.

vim /mnt/etc/fstab

Finally, its time to login to your system eh! 😀

arch-chroot /mnt<br><br>

4. Language and location settings

With Arch linux you do everything youself, so lets run

vim /etc/locale.gen

It will open huge list of locals, uncomment the one you need by removing ‘#’ infront, if your english uncomment [en_US.UTF-8 UTF-8]

Now set the locale, by running these commands.individuallyy,

locale-gen

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

export LANG=en_US.UTF-8

Now configure the timezone, you can find zone and subzone by running mine was Asia/Kathmandu

ls /usr/share/zoneinfo and
ls /usr/share/zoneinfo/YOUR_ZONE

Configure the clock by running

ln -s /usr/share/zoneinfo/{Zone}/{SubZone} /etc/localtime
#Configure the hardware clock by running
hwclock --systohc --utc

Configuring the Repos

You can configure repos by editing pacman.conf to do so run

vim /etc/pacman.conf

If you are using 64 bit system you should go ahead and enable (un-comment) the ‘multilib’ repo:

[multilib]

Include = /etc/pacman.d/mirrorlist

Update the repos by running

pacman -Sy

5. Create users and password

Root Password is empty by default, set the root password by running

passwd

Now create user to access the system by running

useradd -m -g users -G group_name,storage,power -s /bin/bash your_username

#Add password for user by running
passwd your_username

Now we need to add the user to the list of sudoers, which allows it to perform administrative tasks.

First, install Sudo, yes, you need to install that too 🙂

pacman -S sudo

Now allowing user of group_name to perform administrative tasks. Enable sudo access:

EDITOR=nano visudo

Uncomment %wheel ALL=(ALL) ALL by removing ‘#’

Bonus: Install Bash completion package to auto complete commands by running

pacman -S bash-completion

6. Install boot loader

Now lets install GRUB:

pacman -S grub-bios
grub-install --target=i386-pc --recheck /dev/sda
cp /usr/share/locale/en@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

If you are dual booting, have other os like other linux or crappy Wee-n-Dows you need OS Prober, run

pacman -S os-prober

Now Run the grub config to generate config:

grub-mkconfig -o /boot/grub/grub.cfg

7. Finishing Installation

Exit and reboot

exit
umount /mnt
reboot

8. Booting into your new Arch system

Now remove your USB/CD and the Arch Linux Boots into commandLine. You won’t have internet. So you need to connect to internet manually. Run the following command to find out your network card name, it can be something like “enp4s0”

ip link

Enable and start your network by running, where {interface} is your network card name;

sudo systemctl enable dhcpcd@.service
sudo systemctl start dhcpcd@{interface}.service

Test your connection by running

ping -c 3 smjrifle.net

9. Installing X – “The graphical Display”

All you have seen till now is a black window with white font, now let’s bless those eyes with some GUI. To test if everything is working lets install the X by running

sudo pacman -S xorg-server xorg-xinit xorg-server-utils

Also install mesa for 3D support

pacman -S mesa

You need to install your graphics driver. Be careful what you select. You can refer to Arch Wiki Here.

Almost done, now some input drivers, especially the touchpad for Laptops

pacman -S xf86-input-synaptics

Now test the default desktop environment

pacman -S xorg-twm xorg-xclock xterm
#boot into graphical interface by running
startx

If everything is fine, you will see windows, you can type exit in the terminal to exit the desktop and continue to install the preferred Desktop Environment. If you get a blank screen, reboot and run the following command.

grep EE /var/log/Xorg.0.log

It will show what errors have occurred, check if it gives any graphics driver error, if so, remove what you installed and install the driver specified there, and test again.

10. Getting your favourite Desktop Environment

I recommend you install Gamin first then you install the desktop environments.

pacman -S gamin

You can now install any desktop environment: Gnome, KDE, or Cinnamon. I will install LXDE for myself by running. You can install multiple too.

pacman -S lxde
pacman -S lxdm

Here is the list of supported desktop environments. Click Me.

sudo pacman -S desktop_environment_code

The code is small case names in the wiki to the right of URLs of Desktop Environment. Then enable and start the service

systemctl enable lxdm.service
systemctl start lxdm.service

I had to run the following command to get my Display Server booted up at startup

echo 'exec ck-launch-session dbus-launch startlxde'> ~/.xinitrc

It consists of startlxde, different desktop environments might have different things. However, it might not be necessary for KDM or GDM.

Now reboot 🙂 You will be presented with the login Screen. Log in and get ready for post-installation customization.

11. Essential Applications

When you have booted to the desktop, you will notice it lacks many applications. Let’s install them using pacman. Some apps are available from AUR. Bookmark this link Arch User Repository

Pacman options:

  • -S Sync/Install
  • -R Remove
  • -U Update
  • -Ss search

Start installing tools:

pacman -S wget git firefox vlc gimp filezilla gparted
pacman -S zip unzip p7zip unrar
pacman -S chromium thunderbird

12. Development Stack (LAMP)

Apache

pacman -S apache

MySQL

pacman -S mysql
systemctl start mysqld
mysql_secure_installation

PHP

pacman -S php php-apache

Edit the Apache config and enable the PHP module.

Enable services:

systemctl enable mysqld httpd

13. Networking Fix (WiFi)

Install NetworkManager:

pacman -S network-manager-applet
systemctl enable NetworkManager
systemctl start NetworkManager

14. Useful Additions

  • Fonts
pacman -S ttf-dejavu
  • NTFS support
pacman -S ntfs-3g

Final Thoughts

Arch Linux is not just an OS; it is an experience.

  • You install everything manually
  • You understand every component
  • You control your system completely

It may feel complex at first, but once you go through it, you will understand Linux at a much deeper level.

And yes, it definitely gives that geeky satisfaction 🙂