10 Things to do first after installing Arch Linux

It's only fair to share...Share on Facebook
Facebook
Share on Google+
Google+
Tweet about this on Twitter
Twitter
Share on Reddit
Reddit
Email this to someone
email

You have just installed Arch Linux and wonder what to do next. I am going to share with you my 10 things to do first after installing Arch Linux.

Arch Linux is very configurable and you can tweak it endlessly. But I believe these 10 things to do first after installing Arch Linux are the most essential for great user experience and security.

You can watch the video tutorial or continue reading below.

Video Tutorial

1. Install LTS kernel

The first thing to do after installing Arch Linux is to install the LTS (long-term support) kernel, which is recommended installing if you want to make your Arch system more stable. The LTS kernel gets less frequent updates but it is patched with all the security fixes. First, check your current kernel:

umane -r
1.- Showing version kernel

Showing version kernel and installing linux-lts package

Then, install the LTS kernel and reconfigure grub.

sudo pacman -S linux-lts
sudo grub-mkconfig -o /boot/grub/grub.cfg
2.- reconfiguring grub

Reconfiguring GRUB

You may also install linux-lts-headers. It is required for some applications like VirtualBox. If you want to install the package, then run:

sudo pacman -S linux-lts-headers

Reboot and check which kernel is in use with uname -r.
If everything is fine and your active kernel is the LTS kernel. Feel free to remove non-lts kernel

sudo pacman -Rs linux

2. Install Microcode

Microcode is some kind of software installed on your processor. While microcode can be updated through the BIOS, the Linux kernel is also able to apply these updates during boot. These updates provide bug fixes that can be critical to the stability of your system. For Intel processors with the GRUB boot loader, install intel-ucode (for AMD processors install linux-firmware) and update the GRUB config file:

sudo pacman -S intel-ucode
sudo grub-mkconfig -o /boot/grub/grub.cfg
3.- Installing intel-microcode package

Installing intel-microcode package

3. Disable GRUB delay

GRUB is a multiboot loader, developed by the GNU project that allows us to choose which Operating System to boot from the installed ones. It is mainly used in GNU/Linux operating systems. You see this GRUB menu every-time you start the system.

4.- GRUB

GRUB Menu

Sometimes this is annoying because it wastes our time. Let’s make the system skip it and load as fast as possible. Open the GRUB configuration file:

sudo nano /etc/default/grub

Add the following to at the end of the file:

# achieve the fastest possible boot:
GRUB_FORCE_HIDDEN_MENU="true"
5.- Editing grub configuration file

Editing GRUB configuration file

Then download this file 31_hold_shift.gz, uncompress it and place it to /etc/grub.d/.

gunzip 31_hold_shift.gz
sudo mv 31_hold_shift /etc/grub.d/

Make it executable, and regenerate the GRUB configuration:

sudo chmod a+x /etc/grub.d/31_hold_shift
sudo grub-mkconfig -o /boot/grub/grub.cfg
6.- Editing grub configuration file

Changing Permissions to script

This won’t show GRUB menu during the system load. To show GRUB menu, you need to hold the Shift key during the start-up.

4. Install some key packages

Here, I recommend only cross-desktop packages such as fonts, spell checking dictionaries, Gstreamer plugins, java etc. These are the packages I recommend, check their names in the command below:

# pacman -S adobe-source-sans-pro-fonts aspell-en enchant gst-libav gst-plugins-good hunspell-en icedtea-web jre8-openjdk languagetool libmythes mythes-en pkgstats ttf-anonymous-pro ttf-bitstream-vera ttf-dejavu ttf-droid ttf-gentium ttf-liberation ttf-ubuntu-font-family
7.- installing recommended packages

Installing Recommended Packages

I will do a separate video about the applications I install in KDE Plasma 5 desktop.

5. Set up firewall

A firewall is a computer program that controls the access of a computer to the network and of network elements to the computer, for security reasons. The best way to set up a firewall on Linux is to use iptables, which is a built-in Linux firewall. But it is quite complicated and deserves a separate tutorial. Here, I will show you how to set up an uncomplicated firewall which is fine for a regular user.

First, we must install it:

sudo pacman -S ufw

Next, we must enable the service:

sudo ufw enable

Check the status of the service, to make sure it works:

sudo ufw status verbos
Installing firewall

Checking Firewall status

The default rules to deny incoming and allow outgoing are good for most of the users.

Finally, enable the start-up of this firewall with the system.

sudo systemctl enable ufw.service

Reboot and check the status again. It should be active.

6. Encrypt your home directory

It is wise to make a back up of all your data before this step. Encrypting your home folder is a very good idea if you want to have even more protection for your files. The simplest way to encrypt your home is to use ecryptfs-migrate-home script.

To run it, you need to log out. Switch to a virtual console with Ctrl+Alt+F2. Login as a root and check that your user owns no processes:

ps -U username

There should be no output. If some processes are active you can kill them or reboot and login as a root again.

9. Checking processes user

Checking use’s processes

Now, install the necessary applications:

sudo pacman -S rsync lsof ecryptfs-utils
10.- Installing packages

Installing required packages

Then encrypt your home directory:

modprobe ecryptfs
ecryptfs-migrate-home -u username
11.- Encrypting the folder

Encrypting the home folder

Use the same passphrase as your login password. It is required for auto-mounting during the login.

Log out and log in as a regular user and mount your encrypted home.

ecryptfs-mount-private

Unwrap the passphrase and save it somewhere where only you can access it.

ecryptfs-unwrap-passphrase
12.- Encrypting the home folder

Encrypting the home folder

Now, run:

ls .ecryptfs

And make sure auto-umount and wrapped-passphrase exist.
Then open system-auth file:

sudo nano /etc/pam.d/system-auth

And after the line containing auth required pam_unix.so add:

auth required pam_ecryptfs.so unwrap

Next, above the line containing password required pam_unix.so insert:

password optional pam_ecryptfs.so

And finally, after the line session required pam_unix.so add:

session optional pam_ecryptfs.so unwrap

See the final result in the image below.

13.- Editing config file

Editing config file for Encrypting the home folder

Reboot and make sure that you can log in to your desktop. Now it is safe to remove the backup of your home which was created during the migration. It is named with your username and some random characters.

sudo rm /home/username.randomCharacters

7. Remove orphans

After installing Arch Linux and configuring it, you can little clean your system. This is important if you want to save disk space and improve disk performance. You can remove unused packages (orphans) and their configuration files.

sudo pacman -Rns $(pacman -Qtdq)
14.- Removing orphans packages

Removing orphans packages

I have no unused packages on my system (image above), but you may have some listed after that command.

8. Optimize pacman’s database access speeds

Arch Linux performance can be further enhanced by optimizing the pacman package manager with the following command:

sudo pacman-optimize
15.- Improving packman

Improving packman performance

This improves the speed at which pacman accesses the system’s databases.

9. Check for errors

First, check for failed systemd services:

sudo systemctl --failed

Second, check for errors in logfiles:

sudo journalctl -p 3 -xb
16.- Searching for errors

Looking for errors

If you find some errors, google them. If they are serious, try to fix. The errors you see on my system (image above) are not very dangerous as far as I know.

10. Backup the system

It is always good to have a backup of the system, so you can recover it in case there is a problem with it. And it is the last thing to do after installing Arch Linux.

I have already described how to back up your system in this post. Please, read it. Here, I only provide the commned to back up everything except some unnecessary directories:

sudo rsync -aAXvP --delete --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/run/* --exclude=/mnt/* --exclude=/media/* --exclude=/lost+found / /mnt/backupDestination/
17.- Making a backup

Making a backup

As a conclusion, I would like to say that Arch Linux is very configurable and adaptable to many situations. So, there are many other things do after installing Arch Linux, but these 10 are the most essential in my view.

I hope this tutorial was useful for you. Let me know what you would add to this list by commenting below. And please share it.

Thank you for reading.

It's only fair to share...Share on Facebook
Facebook
Share on Google+
Google+
Tweet about this on Twitter
Twitter
Share on Reddit
Reddit
Email this to someone
email

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.