What is AUR? How to use AUR in Arch and Manjaro Linux?
If you have been using Arch Linux or other distribution based on Arch such as Manjaro, you might have comes across the term AUR. You try to install a new software and someone suggests to install 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 distributions users. It contains package descriptions named PKGBUILDs that allow you to compile a package from source with makepkg and then install it via pacman (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.
A good number of 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 has the ability to 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 to 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 to the uploaded packages, there is in 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 so you never have to worry about overwriting files in one package with files from another package 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 a AUR helper. An AUR helper is a command line tool (some has 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 git sudo git clone https://aur.archlinux.org/yay-git.git cd yay makepkg -si
Once installed, you can use 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. Expand the next section to see how to use AUR without AUR helper.
Installing AUR packages without AUR helpers
If you don’t want to use AUR helper, you can install packages from AUR on your own as well.
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] makepkg -si
For example. let’s say you want to install telegram desktop package:
git clone https://aur.archlinux.org/telegram-desktop-git.git cd telegram-desktop-git makepkg -si
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 same for all Manjaro flavors.
Open Pamac (listed as Add/Remove Software):
Once you are in pamac go to preferences like shown below.
In preferences dialog box go to 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.
I hope you find this article useful and keep an eye on social media for upcoming Arch related topics.