Downloading Arch Linux and preparing a boot device
- Go to www.archlinux.org/downloads
- Download using torrent link |OR| click on any mirror closest to your location and download only the .iso file.
- Next you will need a software to create a boot device. Rufus is one of the best software to create a boot device.
- Download Rufus from rufus.aeko.ie
- Next you will need a USB drive (min. 8GB). Insert your USB drive and open Rufus.
- Select your USB device and the iso image you downloaded from the provided options in the Rufus and click start to make the device bootable. [NOTE: This process will erase all the previous data on your USB device]
Installation – Part I
- Make sure your USB device that you prepared in the above step is inserted in the Computer you want to install Arch.
- Turn on your PC and make USB as your primary boot device through boot menu.
- If you don’t know how to then press F1/F9/F11/F12 to open the boot menu and select USB device. [The boot menu key varies as per the Computer so repeat this step until you find the actual one for your PC]
- The Arch boot menu should now appear on your screen as in IMG 2.1. Now select the live medium option i.e. Boot Arch Linux (x86_64)
Installation Part – II
fdisk -l↵ to view the current disk partition.
cfdisk /dev/sda↵ for disk partitioning menu.
- Select each partition and delete them with the option provided on the bottom.
- After all the partition are deleted select the free space and click on new option. Then enter the size for the swap partition (generally 2G should be enough) and select primary as it’s logical partition.
- Then select the type for this partition as 82 i.e. Linux Swap/Solaris.
- Again go to the remaining free space and click on new as before. Just hit enter providing the remaining space for this partition, also select primary as logical partition for this as well.
- Mark this as a bootable from the option at bottom. Then go to write option, hit enter key and type
yes↵ followed by
mkfs.ext4 /dev/sda2↵ for formatting the disk drive and setting filesystem.
- Now Internet connection is needed for further step so to check your connection you can type
ip a↵. If you see the IP address then you should be connected just as good.
- You also can type
ping -c 5 126.96.36.199↵ to ping the Google 5 times and see if you are able to connect or not.
- However, if you are connect through ethernet cable and still cannot ping then you can simply type
dhcpcd↵ to connect to the Internet else type
wifi-menu↵ if you are on wireless connection.
- mount /dev/sda2 /mnt to mount the root partition.
pacstrap -i /mnt base↵ for installing distribution packages on hard-disk. Hit enter for default options and wait till the installation finishes.
genfstab -U -p /mnt >> /mnt/etc/fstab↵ to get the distribution mounted correctly.
arch-chroot /mntto use the actual installation.
pacman -S grub-bios linux-headers linux-lts linux-lts-headers↵ to install the required packages. Hit enter for default options and wait till the installation finishes.
nano /etc/locale.gen↵ to open the configuration file locale.gen. Then uncomment the line en_US.UTF-8 UTF-8 (or any other region that you prefer) by deleting the # sign in that line, press Ctrl+O to save followed by Crtl+X to exit.
locale-gen↵ to generate the locale file.
ln -sf /usr/share/zoneinfoand press TAB key couple of times to view the list of the time zones.
- Locate the region you are closest to and type the region name in the end of the above code e.g
ln -sf usr/share/zoneinfo/Asiaand hit the TAB key again couple of times.
- Find the location appropriate to you and type the name e.g
ln -sf usr/share/zoneinfo/Asia/Kathmandu.
ln -sf /usr/share/zoneinfo/Asia/Kathmandu etc/localtime↵ to set your timezone.[NOTE: Change
/Aisa/Kathmanduas per your location]
hwclock --systohc --utc↵ to syncronize the clock.
passwd↵ for setting password of root user. Then type in your desired password as required.
grub-install --target=i386-pc -recheck /dev/sda↵ to install grub on your system. Hit enter for default and wait for the installtion to complete.
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo↵ to copy the required files.
grub-mkconfig -o /boot/grub/grub.cfg↵ for configuring the grub.
exit↵ to exit the chroot environment.
umount /mnt↵ to mount the directory.
reboot↵ for rebooting with normal OS.
- If you boot from the USB device and see the Arch boot option as in IMG 2.1 then select the option Boot existing OS. If not then proceed with the next step.
- Now login with username
rootand enter the password you set in step 24.
mkswap /dev/sda1↵ to set the swap partition.
swapon /dev/sda1↵ to activate the swap.
free -m↵ to check if your swap partition is working.
localectl set-locale LANG="en_US.UTF-8"↵ [NOTE: Replace
en_US.UTF-8with the language you uncommented on step 17 of Installation Part – II]
- Again we will require the internet connection for further process so check your connection as in step 9 to step 11 of Installation Part – II.
pacman -Sy networkmanager network-manager-applet wireless_tools wpa_supplicant wpa_actiond dialog↵ for installting the basic packages for network manager. Hit enter for defaults and wait untill the installtion is completed.
Installing the Desktop Environment [KDE Plasma]
useradd -m -G wheel -s /bin/bash home↵ to create a new user named home. [NOTE: Replace
homewith the username you desire]
passwd home↵ to assign password for the user home. [NOTE: Replace
homewith the user you created in above step]
pacman -Sy sudo↵ for installtion sudo. Hit enter key for defaults.
visudo↵ to allow the use of the sudo command for above user. Now uncomment the line %wheel ALL = (ALL) ALL by deleting the # sign in the line. Then press ESC key and type
:wq↵ to save and exit.
ls /home↵ to check the user home directory.
pacman -S xorg-server xorg-apps xorg-xinit↵ to install the xorg display server. xorg is a popular display server for linux you can install other display server if you like by going through the official Arch wiki. Hit enter for defaults and wait till the installtion is completed.
pacman -S xf86-video-vesa↵ to install graphics diver. [NOTE: Replace
xf86-video-vesawith your corresponding graphics manufacturer.]
Graphics Manufacturer Installation Code AMD
You also can install vesa driver along side your primary driver as vesa driver can back you up if your primary driver fails.
pacman -S sddm↵ to install the Display manager for KDE Plasma. Also you can install other display manager that corresponds with your driver. (see the table below)
Display Manager Installation Code KDE Plasma 5
Universal Display Manager
pacman -S plasma kde-applications↵ for installing the required packages to run the desktop environment and basic applications for the desktop. [NOTE: You can replace
kde-applicationswith the Desktop Environment packages you like to install, see the table below]
Desktop Environment Package Code Application Code KDE Plasma 5
systemctl enable sddm↵ to enable the display manager on boot. [NOTE: Replace
sddmwith the display manager you installed on step 8 of Instaling the Desktop Environment]
- reboot↵ to reboor the system.
- Unplug your USB device and you should be noe greeted witht he Desktop Environment that you installed. Enter the password your set for the user in step 2 of Installing the Desktop Environment.