UPDATE 2018: pacaur is no longer maintained, one of the best alternatives is trizen, the post is updated accordingly.
UPDATE 2019: pacaur is back in business, still my favorite AUR helper tool
Archlinux is still, by far, our best linux distro of all times. Although you might have installed Archlinux a number of times before, but there are always some steps that might get missing and based on that requires some extra reboots to get inside an operable Archlinux installation. So this post is for beginners, intermediates and experts who need to have a step-by-step installation from a live ISO to a fully functional Archlinux/KDE installation.
You can always check The Official Guide
After partitioning your harddrive, you can start following these steps this post.
- 1 Installing Archlinux
- 2 Welcome to Arch
- 3 Post Installation
- 3.1 Install grub
- 3.2 Install Xorg
- 3.3 Install video driver and OpenGL
- 3.4 Install sudo
- 3.5 Create new user
- 3.6 Install pacaur
- 3.7 Install trizen [pacaur alternative]
- 3.8 Install bash autocomplete
- 3.9 Install SDDM
- 3.10 Install KDE
- 3.11 Install Plasma-nm applet and enable NetworkManager
- 3.12 Install okular
- 3.13 Install yakuake
- 3.14 Install VLC
- 3.15 Install gwenview
- 3.16 Install Thunderbird
- 3.17 Install Hunspell
- 3.18 Install Kate
- 3.19 Install ark
- 3.20 Install Gimp (Optional)
- 3.21 Install LibreOffice (Optional)
- 3.22 Install Chromium Browser or Firefox (Optional)
- 3.24 Install dialog
- 3.25 Install NTFS-3G
- 3.26 Conclusion
- Use fdisk to partition your PC through terminal.
- Recommended partition table is (3 different mount points):
- / : Root mount point (More than 10 GB is recommended)
- /boot : Boot Mount point (100~500 MB)
- /home : Home Mount point (More than 1 GB is recommended)
- To connect to the internet through Wifi use : wifi-menu and follow instructions.
- Anything with an example, means you need to replace something in the command to make it work on your machine, like your specific locale, drives, partitions, etc.
- mount /dev/sdaX /mnt
- Example : mount /dev/sda1 /mnt (Depends on your drives/partitions names)
- mkdir /mnt/boot
- mount /dev/sdaY /mnt/boot
- Example : mount /dev/sda2 /mnt/boot (Depends on your drives/partitions names)
- pacstrap /mnt base
pacstrap is the line to give birth to a new Archlinux installation! After this line we should have a new arch under /mnt.
So, now, let’s use the new arch installation,
DON’T REBOOT JUST YET!
Welcome to Arch
Chroot is a process to “encage” the root directory for the current running process and its children. So, we are telling our installer to go to /mnt and take it as the new root (/) to help us run some commands as if we have booted to the new arch installation without actually doing so.
- arch-chroot /mnt
- ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
- Example : ln -sf /usr/share/zoneinfo/Egypt /etc/localtime
- hwclock –systohc
- nano /etc/locale.gen then uncomment desired locales, at least uncomment en_US.UTF-8 UTF-8 entry
- echo LANG=en_US.UTF-8 >> /etc/locale.conf
- echo ‘yourhostname’ >> /etc/hostname
- Example : echo ‘titrias.home’ >> /etc/hostname’
After these steps, arch is configured to run on your PC, but without any packages. If you try to boot after this step, you will get a working terminal which is enough in some cases, but not ours. It’s time to give our newborn some clothes. Anyways please don’t reboot just yet!
DON’T REBOOT JUST YET!
While you are still chrooted, we will need to start installing some packages to get a more functional installation.
Use this command to install grub :
pacman -S grub
Then use this command to burn grub on your hard disk:
grub-install –target=i386-pc /dev/sdx (Example : grub-install –target=i386-pc /dev/sda)
Use disk path not partition path, i.e., sda not sda1. Otherwise you will get this error:
warning: File system `ext2′ doesn’t support embedding.
warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
error: will not proceed with blocklists.
Then use this command to generate a config file :
grub-mkconfig -o /boot/grub/grub.cfg
Xorg is responsible of giving us a GUI instead of a CLI, it’s called a video server
pacman -S xorg-server
Install video driver and OpenGL
For example, for intel GPUs use this command :
pacman -S xf86-video-intel mesa
For more info check Xorg guide.
Archlinux comes with NO sudo capabilities so you have to install sudo, and specify sudoing policy.
Use this command to install sudo:
pacman -S sudo
For how to Specify sudoing policy, check this guide
Sudo policies can be found in /etc/sudoers
So, edit the file to match your needs or follow one of these recommendations:
Recommendation 1 : Create new group called sudo and uncomment this line : # %sudo ALL=(ALL) ALL
Recommendation 2 : Just use wheel group, to do so uncomment this line # %wheel ALL=(ALL) ALL
Create new user
useradd -m -g wheel -s /bin/bash fady
Here we created new user fady and added it to group wheel and hooked it to bash as the default terminal
Pacaur is no longer maintained and will soon it won’t work, use trizen or choose your better alternative here.
[Update] Pacaur is back in business in 2019
First, we need to install base development group :
pacman -S –needed base-devel
Then, for pacaur this shell file is one of the best to get it done in no time, by the great Tadly: https://gist.github.com/Tadly/0e65d30f279a34c33e9b
Install trizen [pacaur alternative]
Trizen is popular and maintained AUR helper tool.
git clone https://aur.archlinux.org/trizen.git
Install bash autocomplete
Bash compilation gives your bash wings and some auto complete capabilities
pacman -S bash-completion
SDDM is responsible of providing a login screen on each boot instead of going through the TTY/startx procedure.
pacman -S sddm
systemctl start sddm
systemctl enable sddm
Let’s install the best desktop environemnt, our beloved KDE
pacman -S plasma
Archlinux gives you three options for installing KDE, plasma, plasma-meta and plasma-desktop
- plasma-meta is a meta package, we don’t recommend using it because if you tried to remove any dependency later on, it will ask to remove the whole meta, the cool thing about meta is, it can automatically add new dependencies later on and it will ask to install it for you on any later update.
- plasma is a group package, we recommend using it, as it feels Archie the most, because you can easily select which dependencies you need and you can later remove any dependency at well, but you need to maintain new dependency whenever Archlinux adds one.
- plasma-desktop is a minimal meta package, it takes the best of both worlds, by installing only the very core packages of KDE and you can take care of the rest manually.
Install Plasma-nm applet and enable NetworkManager
Plasma-nm makes you tray a home for a nice NetworkManager applet
pacman -S plasma-nm
To enable (make it autostart) NetworkManager service use:
systemctl enable NetworkManager
Okular is an Ebook Reader, simple yet capable.
pacman -S okular
Yakuake is the best terminal for KDE, it’s very similar to guake
pacman -S yakuake
VLC can simply play all your videos without any external tools. You will need QT4 to have it working on KDE.
pacman -S qt4 vlc
Gwenview is the best image viewer for KDE
pacman -S gwenview
Thunderbird is by far my favorite email client for linux, recently it has started to play nicely with KDE
pacman -S thunderbird
After that you should install the FireTray extension to have thunderbird icon in the tray (Tools>Add-ons)
Hunspell is a spellchecker that’s used by a lot of applications, e.g. Thunderbird.
pacman -S hunspell hunspell-en
Kate is used to handle text files, pretty much similar to Geany.
pacman -S kate
Ark compresses/extract zip files from within dolphin.
pacman -S ark
Install Gimp (Optional)
Gimp is the photoshop for linux.
pacman -S gimp
Install LibreOffice (Optional)
Create and edit document files, spreadsheets and presentations.
pacman -S libreoffice
Install Chromium Browser or Firefox (Optional)
My pick is chromium but you can install whatever you want
pacman -S chromium
pacman -S firefox
Dialog is important in case we needed the wifi-menu command, so this step is totally optional
pacman -S dialog
NTFS-3G is an open source implementation of NTFS that includes read and write support.
pacman -S ntfs-3g
Congratulations on your Archlinux/KDE installation, if you have any favorite KDE apps not on the list, feel free to mention it in the comments.