Installing Arch Linux: Part 2

Installing Arch Linux: Part 2

Update 2018-07-5: Yoaurt is no longer maintained. Change aur helper from yaourt to aurman.

This is the continuation of the previous post. If you haven’t read it, I would recommend doing it before moving further. If already done so, let begin

Adding a new user:

Root user is not recommended for daily purposes, as it poses various security threats. To avoid this, let begin by adding a normal user, with a preferred shell such as bash/zsh:

useradd -m -U -G wheel,input,video,users,audio,cdrom -s /bin/(bash|zsh) username

Set a new password for the user by typing passwd username
We may want to allow the user to run commands as root via sudo. To do this, type visudo in the terminal and uncomment the following line:

## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL

That’s it! Next time, you can login as a normal user.

Pacman configuration:

It is recommended to update pacman mirrors according to their speed and geolocation. To do this, we will take the help of reflector package:

pacman -S reflector

Make a backup copy of your existing mirrorlist in case things go wrong and generate the new ones using the following commands:

mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.old
reflector --latest 20 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist

Advanced options can be found on the Arch Linux Wiki page.

Nvidia driver on Optimus enabled laptops:

If you have a Nvidia Prime enabled laptop, i.e your laptop has both an integrated GPU(iGPU) and a discrete Nvidia GPU, you can take advantage of the power saving benefits of PRIME technology. To do so, follow the steps to install bumblebee.

Installing Graphical User Interface:

Unlike me, if you prefer full blown Desktop Environment like GNOME or KDE, install the respective package group, and it will pull all required dependencies and perform the necessary configurations. For example, installing GNOME will look like:

sudo pacman -S gnome gnome-extra

However, if you prefer Window Managers like I do, you can install your preferred wm and continue configuring the same:

sudo pacman -S xorg xorg-xinit awesome vicious compton unclutter

Different window managers require different configuration which is beyond the scope of the article. However, for beginners, I would recommend i3 wm and advanced users can either go for Xmonad or Awesome.

Unmute master volume:

If you have installed a Desktop Environment like Gnome, KDE, Xfce, etc, you may skip this step, else:

sudo pacman -S alsa-utils  # If not installed

Unmute the master by hitting m key.

Configure Arch User Repository(AUR):

AUR is the repository hosting community contributed packages to Arch Linux. If you ever run into a situation where there are packages for Ubuntu and/or Fedora but not Arch, there is a good chance you will find it in the AUR. To install packages from the AUR, you can either manually build packages and install via the Arch Build System(ABS) or using AUR helpers. For this post, we will install Yaourt using custom repostiory. To do this, edit the following file and add:

SigLevel = Never
Server =$arch

Just run sudo pacman -Syyu after saving the file. Your package databases will be updated and you can install yaourt using sudo pacman -S yaourt.

Update: Yaourt, as well as pacaur, one of my favorite AUR helper are no longer maintained. You can install one of the AUR helpers from the list. For example, to install aurman perform the following steps:

mkdir aurman && cd aurman
curl -o PKGBUILD ""
makepkg -si
cd .. && rm -rf aurman

That’s it folks! Now reboot and enjoy your newly installed Arch Linux 😎


Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now