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/sdXNow 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.net2. 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 -lOr use a more interactive tool:
cfdisk /dev/sdaCreate 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
XandYwith 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/sdaY3. Time to install the base system
Lets mount your root partition,
mount /dev/sda1 /mntLets install the base and developer’s packages now
pacstrap -i /mnt base base-develImportant: Run the command below only once even if it gives error
genfstab -U -p /mnt >> /mnt/etc/fstabNow 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/fstabFinally, 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.genIt 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-8Now 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_ZONEConfigure the clock by running
ln -s /usr/share/zoneinfo/{Zone}/{SubZone} /etc/localtime
#Configure the hardware clock by running
hwclock --systohc --utcConfiguring the Repos
You can configure repos by editing pacman.conf to do so run
vim /etc/pacman.confIf you are using 64 bit system you should go ahead and enable (un-comment) the ‘multilib’ repo:
[multilib]
Include = /etc/pacman.d/mirrorlistUpdate the repos by running
pacman -Sy5. Create users and password
Root Password is empty by default, set the root password by running
passwdNow 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_usernameNow 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 sudoNow allowing user of group_name to perform administrative tasks. Enable sudo access:
EDITOR=nano visudoUncomment %wheel ALL=(ALL) ALL by removing ‘#’
Bonus: Install Bash completion package to auto complete commands by running
pacman -S bash-completion6. 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.moIf you are dual booting, have other os like other linux or crappy Wee-n-Dows you need OS Prober, run
pacman -S os-proberNow Run the grub config to generate config:
grub-mkconfig -o /boot/grub/grub.cfg7. Finishing Installation
Exit and reboot
exit
umount /mnt
reboot8. 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 linkEnable and start your network by running, where {interface} is your network card name;
sudo systemctl enable dhcpcd@.service
sudo systemctl start dhcpcd@{interface}.serviceTest your connection by running
ping -c 3 smjrifle.net9. 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-utilsAlso install mesa for 3D support
pacman -S mesaYou 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-synapticsNow test the default desktop environment
pacman -S xorg-twm xorg-xclock xterm
#boot into graphical interface by running
startxIf 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.logIt 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 gaminYou 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 lxdmHere is the list of supported desktop environments. Click Me.
sudo pacman -S desktop_environment_codeThe 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.serviceI had to run the following command to get my Display Server booted up at startup
echo 'exec ck-launch-session dbus-launch startlxde'> ~/.xinitrcIt 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 thunderbird12. Development Stack (LAMP)
Apache
pacman -S apacheMySQL
pacman -S mysql
systemctl start mysqld
mysql_secure_installationPHP
pacman -S php php-apacheEdit the Apache config and enable the PHP module.
Enable services:
systemctl enable mysqld httpd13. Networking Fix (WiFi)
Install NetworkManager:
pacman -S network-manager-applet
systemctl enable NetworkManager
systemctl start NetworkManager14. Useful Additions
- Fonts
pacman -S ttf-dejavu- NTFS support
pacman -S ntfs-3gFinal 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 🙂
