Installing Arch Linux: Part 2

Catalogue
  1. 1. Adding a new user:
  2. 2. Pacman configuration:
  3. 3. Nvidia driver on Optimus enabled laptops:
  4. 4. Installing Graphical User Interface:
  5. 5. Unmute master volume:
  6. 6. Configure Arch User Repository(AUR):

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:

1
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:

visudo
1
2
## 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:

1
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:

1
2
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:

1
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:

1
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:

1
2
sudo pacman -S alsa-utils  # If not installed
alsamixer

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:

/etc/pacman.conf
1
2
3
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$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:

1
2
3
4
mkdir aurman && cd aurman
curl -o PKGBUILD "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=aurman"
makepkg -si
cd .. && rm -rf aurman

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

ShareComments