I installed Arch Linux, now what?

23 Sep 2019 - John

The last time we talked about Arch Linux, I walked you through the install process. However, while your system is totally usable, there are still a few things we have to do, so we're far from being done.

Stop Windows from messing up the system clock

This is a subtle, but very annoying problem and can drive you insane if you don't realize what's going on. Let's say you live in an area that has a time zone of GMT-4 and it's 2PM in your local time. This means that in a GMT area it's 6PM, so that's a no brainer, right?

So you set the time to 2pm on your Linux partition and live happily ever after. Then you boot windows for two hours of gaming. It's now 4PM. Time to get back to work, so you go to your Linux partition and it says it's 12PM. How come?

The problem lies in the different ways both operating systems handle the computer's clock time. In Linux, the system is configured to use the UTC standard -that is, to use GMT with no offset- and then apply the offset at the OS level, so your computer's clock has to actually be set to 8PM so that Linux applies that -4 offset itself so it can correctly display 4PM.

Windows, on the other hand, assumes that the computer's clock is using the local standard, so it will keep "correcting" the discrepancies.

You could use the local time on both, but the correct practice is to have the hardware clock running in UTC and have both operating systems apply their respective offsets.
I didn't mention any of this in the last part, so let's take care of this now. Boot into Arch and fire up a terminal window, then enter

sudo timedatectl set-local-rtc 0

Now reboot into Windows and click on start > run. Then type regedit and press enter. Now navigate the left pane tree until you reach this route:


Right click on TimeZoneInformation, click on new > qword and enter RealTimeIsUniversal as the name and 1 as the value. If Windows complains about the clock needing to resync, let it do it. That's it, now your computer's clock is on UTC and both Linux and Windows correctly apply their offsets.

System maintenance

Did you notice that's Arch Linux has no version number? The ISO file has a creation date at most, but that's about it.

That's because Arch Linux is what is called a rolling release, which is just fancy words for "WE USE THE LATEST PACKAGES FOR EVERYTHING!!!". This has one major implication: Let's say you installed your system today and got the latest packages of everything. Then a few months down the road, you decide you need this new shiny thing so you do sudo pacman -S newShinyThing, only to get a bunch of 404 errors. How come?

When you installed Arch for the first time, it downloaded a database with the data of the available packages. As time goes on, that information changes, so your system thinks that the package you want is called shiny-new-thing-1.5, but the repositories moved on to the new bleeding edge version and now they have shiny-new-thing-1.6, effectively rendering your package database obsolete.
The solution is to update your system regularly with the -Syu switch:

  • -S stands for sync, which is just a fancy way of saying "install".
  • y stands for… well, for nothing, but it updates the contents of your package database. For you Ubuntu users, this is the equivalent of running apt-get update.
  • Finally, the u switch stands for upgrade the whole system.

All three should be used every time you want to install a package. So to recap, if you want to install that new shiny thing, use sudo pacman -Syu new-shiny-thing.

Wait a second. If the y updates the package metadata, wouldn't it be enough to issue the -Sy switch? I'm glad you noticed. This makes perfect sense, but it creates a very big problem. Let's say you install shiny-new-thing and it depends on some library to work. That library will get installed or upgraded to the latest version. If you have another application that depends on the older version of the library, congratulations, you just broke that other application. This is called a partial upgrade and it's a big no no in the Arch world. The way to avoid this is to ALWAYS. ISSUE. A. FULL. UPGRADE. EVERY. TIME.

Still, some packages, like PostgreSQL, don't play nice even with new versions of themselves, which is why you should get in the habit of checking Arch's website at least once a week and keep an eye on the Latest News section. If there's a package that requires manual intervention when updating, they'll give you the instructions on how to deal with it. It happens rarely though, and even then, the instructions are usually just a couple of commands to paste on the terminal.

Install PostgreSQL

Speaking of packages that don't play nice, PostgreSQL is particularly guilty. Every time a major upgrade is issued, for example, from version 11.0 to 12.0, things change substantially and can break the PostgreSQL service, so they way to keep things from breaking is to install PostgreSQL, adding it to the list of ignored packages and then upgrading it manually in our own terms. Install PostgreSQL by entering

sudo pacman -Syu postgresql

into the terminal. Then immediately enter

sudo -iu postgres

to get into Postgres console. Then enter

initdb -D /var/lib/postgres/data

And let it do its thing. After it's done, exit the Postgres terminal by entering exit. Finally, enable the PostgreSQL service by entering

sudo systemctl enable postgresql && sudo systemctl start postgresql

Then immediately add PostgreSQL to the list of packages to exclude from upgrades by entering

sudo nano /etc/pacman.conf

Then find the line that says

#IgnorePkg =

and edit it so it looks like this:

IgnorePkg = postgres

From now on, every time you issue an update command, you'll get a notice that Postgres is not being updated. You can still force a minor version update (for example, from 12.1 to 12.2) any time by issuing

sudo pacman -Syu postgres

and you'll get the notice again. Accept and it will install with no problems. For major upgrades, though, you need to use something like pg_upgrade. Takes about one minute to do, but you still need to do it separate from other system updates.

Install Node.js

I like to be able to switch versions of node, so I use NVM, which stands for Node Version Manager. It's super simple to install, you just need to open a terminal and do

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

And restart your terminal. If you don't have curl, you can install it by entering

sudo pacman -Syu curl

After you restart your terminal, you can install the latest version of node by entering

nvm install node

However, if you need a specific version, you can enter, for example

nvm install 12.16.2

To see what versions of node you can use, enter

nvm list

And then you can switch to whatever version you want

nvm use 13.13.0

Install Ruby and gems

Ruby also has a version manager, aptly called RVM. Assuming you installed curl in the last step, get RVM by entering

curl -L get.rvm.io | bash -s stable


nano .bashrc

and add the following at the end:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

then log out and log back in. It uses the same list, install and use commands. Then install RubyGems by issuing

rvm rubygems current

If you get an error, install the libyaml library by entering

sudo pacman -Syu libyaml

And then install you preferred Ruby version by issuing

rvm list known

and then

rvm install 2.6.6 # Or whatever version you prefer

Other cool software to install

In general, if you're looking for a specific app, you should google appName Arch Linux and check the address of the results. If the domain is just archlinux.org, the you can assume you can install by issuing pacman -Syu packageName. If the address has the aur subdomain, that means it's in the Arch User Repository and has to be installed with yay.

From the official Arch repos:

From the AUR:

Cool websites for inspiration

By far, the best place to look at is the unix porn subreddit. It's a place where users share their customizations with descriptions of what they did. You can filter by desktop environment and only see the posts for yours. Other places to look are xfce-look.org and the KDE store if you're into KDE.

Closing thoughts

I hope you enjoyed this small series and stick with Arch Linux. Its wiki it's an excellent source of information that is used even by users of other distros. Finally, please let me know if you think I missed a package that needs to be on either list. I know I did, so don't be shy!