AUR, also called Arch User Repository, is a community-driven repository for Arch-based Linux distributions. It allows users to compile packages from the source and then install them via Pacman. The AUR repository provides a lot of software that’s not tested by Arch’s creators and maintainers, but by its users. Also, AUR packages are easier to install and keep up-to-date all by yourself.
In this post, we will show you how to use AUR with Arch Linux.
- A fresh Arch Linux server on the Atlantic.Net Cloud Platform
- A root password configured on your server
Step 1 – Create Atlantic.Net Cloud Server
First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Arch Linux as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.
Step 2 – Configure Repository
By default, the default repository is outdated in Arch Linux, so you will need to modify the default mirror list. You can do it by editing the mirrorlist configuration file:
Remove all lines and add the following lines:
## Score: 0.7, United States Server = http://mirror.us.leaseweb.net/archlinux/$repo/os/$arch ## Score: 0.8, United States Server = http://lug.mtu.edu/archlinux/$repo/os/$arch Server = http://mirror.nl.leaseweb.net/archlinux/$repo/os/$arch ## Score: 0.9, United Kingdom Server = http://mirror.bytemark.co.uk/archlinux/$repo/os/$arch ## Score: 1.5, United Kingdom Server = http://mirrors.manchester.m247.com/arch-linux/$repo/os/$arch Server = http://archlinux.dcc.fc.up.pt/$repo/os/$arch ## Score: 6.6, United States Server = http://mirror.cs.pitt.edu/archlinux/$repo/os/$arch ## Score: 6.7, United States Server = http://mirrors.acm.wpi.edu/archlinux/$repo/os/$arch ## Score: 6.8, United States Server = http://ftp.osuosl.org/pub/archlinux/$repo/os/$arch ## Score: 7.1, India Server = http://mirror.cse.iitk.ac.in/archlinux/$repo/os/$arch ## Score: 10.1, United States Server = http://mirrors.xmission.com/archlinux/$repo/os/$arch
Save and close the file, then update all the package indexes with the following command:
Step 3 – Create a New User
You can now use the AUR package as a root user, so you will need to create a new user to use the AUR package.
First, create a new user with the following command:
useradd -m user1
Next, set a password for a user with the following command:
Next, edit the sudoers file:
Uncomment the following line:
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
Save and close the file, then add the user to the wheel group:
usermod -aG wheel user1
Step 4 – Install AUR Helper Script
You can use the AUR with the AUR helper tool. AUR helper is a command-line tool that allows you to search and install packages available in the AUR repository.
First, log in as a user1 and install the necessary build tools using the following command:
su - user1 sudo pacman -S --needed base-devel git
You will be asked to choose which you’d like to install.
Select “all” option and press the Enter key. You should see the following screen:
Type Y and press the Enter key to proceed with the installation.
Next, download the YAY tool with the following command:
git clone https://aur.archlinux.org/yay.git
Next, navigate to the downloaded directory and build the package with the following command:
cd yay makepkg -si
Step 5 – How to Use YAY to Install AUR Package
The basic syntax to use YAY is shown below:
yay -S package-name
For example, to install the unzip command, run the following command:
yay -S unzip
If you want to uninstall the package, run the following command:
yay -Rns unzip
To remove unwanted dependencies, run the following command:
Step 6 – Install AUR Package Manually
You can also download the packages from the AUR repository, compile, and install them.
Let’s download the Google Chrome package with the following command:
git clone https://aur.archlinux.org/google-chrome.git
Next, navigate to the downloaded package and compile it with the following command:
cd google-chrome makepkg -si
In this post, we explained how to use AUR in Arch Linux. You can now use AUR to install some additional packages that are not available in the Arch Linux default repository. You can choose one of our dedicated server hosting from Atlantic.Net! to test the AUR.