If you have been using Arch Linux or other distributions based on Arch such as Manjaro, you might have come across the term AUR. You try to install new software and someone suggests installing it from AUR. This leaves you confused.
What is this AUR? Why is it used? How to use AUR? I’ll answer these questions in this article.
What is AUR?
AUR stands for Arch User Repository. It is a community-driven repository for Arch-based Linux distribution users. It contains package descriptions named PKGBUILDs that allow you to compile a package from source with makepkg and install it via pacman, the package manager in Arch Linux.
The AUR was created to organize and share new packages from the community and to help accelerate popular packages’ inclusion into the community repository.
Many new packages that enter the official repositories start in the AUR. In the AUR, users are able to contribute their own package builds (PKGBUILD and related files).
The AUR community can vote for packages in the AUR. If a package becomes popular enough — provided it has a compatible license and good packaging technique — it may be entered into the community repository directly accessible by pacman.
Should you use AUR? What’s the risk involved?
Using the AUR is like crossing the street. If you proceed with caution you should be fine.
If you are new to Linux it is advised not to use the AUR until you build a foundation knowledge about Arch/Manjaro and Linux in general.
It is true that anyone can upload packages to the AUR but the Trusted Users (TUs) are charged with keeping an eye on what gets uploaded. Although TUs perform quality control on the uploaded packages, there is no guarantee that packages in the AUR are well-formed or not malicious.
In practice, the AUR seems to be quite safe but in theory, it can do some damage, but only if you are not careful. A smart Arch user always inspects PKGBUILDs and *.install files when building packages from the AUR.
Additionally, TUs (Trusted Users) also remove packages in the AUR that are included in core/extra/community so there should be no naming conflicts between them. The AUR will often contain developmental versions of packages (cvs/svn/git/etc) but they will have modified names such as foo-git.
As for the AUR packages, pacman handles dependency resolution and detects file conflicts. You never have to worry about overwriting files in one package with files from another unless you use the
--force option by default. If you do that, you probably have more serious problems than file conflicts.
How to use AUR?
The simplest way to use AUR is through an AUR helper. An AUR helper is a command line tool (some have GUI as well) that lets you search for packages published on the AUR and install them.
Installing an AUR helper on Arch Linux
Let’s say you want to use Yay AUR helper. Make sure that you have git installed on Linux. And then clone the repository, go to the directory and build the package.
Use these commands one by one for that:
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
Once installed, you can use the yay command like this to install a package:
yay -S package_name
It’s not that you must use AUR helper for installing packages from AUR. The next section shows how to use AUR without an AUR helper.
Installing AUR packages without AUR helpers
If you don’t want to use AUR helper, you can still install packages from AUR. You have to build them with a few commands.
As soon as you find the package you want to install on AUR page it is advised to confirm “Licence”, “Popularity”, “Last Updated”, “Dependencies” and so on as an extra quality control step.
git clone [package URL]
cd [package name]
For example. let’s say you want to install telegram desktop package:
git clone https://aur.archlinux.org/telegram-desktop-git.git
Enabling AUR support in Manjaro Linux
AUR isn’t enabled by default and you have to enable it through pamac. My laptop runs Manjaro Cinnamon but the steps are the same for all Manjaro flavors.
Open Pamac (listed as Add/Remove Software):
Once you are in pamac go to preferences like shown below.
In the preferences dialog box go to the AUR tab, enable the AUR support, enable check for updates and close the dialog box.
You can now search for packages and those which belong to AUR can be identified by the tag under the package descriptions.
AUR is one of the many reasons why people love Arch Linux and you can see why it is so popular.
I hope you find this article useful and keep an eye on social media for upcoming Arch-related topics.