In this article, we’ll look at how to use AUR in Arch Linux to download and update software applications. Continue reading this article to find out!
AUR Package in Arch Linux
Most Linux-based operating systems have a repository that grants users access to download and update software applications. For instance, Ubuntu has an APT package manager. Similar to that, Arch Linux has an Arch User Repository (AUR).
Arch User Repository allows users to download software applications. In addition, you can also use this to update and manage installed packages. It is a community-driven repository that supports the official repository. Users can use this to search packages that are currently not available in the official repository.
Why Use AUR in Arch Linux
The AUR package has several important features that makes it a great choice for users. These features are:
- Accessibility to additional applications
- Community-driven updates and maintained packages
- Flexibility in installation
- Easy to create and install AUR packages
How to use AUR in Arch Linux
In this section, we’ll cover how to use AUR in Arch Linux in two different ways, manual and automated process. We’ll also cover xxx. So, let’s get started!
Use AUR in Arch Linux Manually
In order to use AUR in Arch Linux manually, we’ll try downloading a package. We’ll first decide the package we want to install from its official repository for this method.
After that, open the Terminal and install the dependencies as shown below:
sudo pacman -S --needed base-devel git wget yajl
The output should look something like this:
Press the “Enter” key to continue with the default option. After that, query the package manager using the git clone command. Specifically, type:
git clone https://aur.archlinux.org/package-query.git
Change the directory to the package-query using the cd
command. For instance:
cd package-query
Compile and install the package-query
as shown below:
makepkg -si
After that, exit the directory. In the search bar, type the package and press “Enter” key. For instance, you want to download the Bookmarks Manager app. Once you click on this package, you’ll see the GitClone URL
in the Package Details section.
Copy this address and head to the command prompt. Once you’ve opened it, type:
git clone <Clone URL>
Make sure to replace the <Clone URL> with the package URL want to download. For example:
git clone https://aur.archlinux.org/packages/bookmarks-manager-appimage
Hit the “Enter” key to start the cloning process. The output should look something like this:
Change into that directory and make its package as shown below:
cd bookmarks-manager-appimage
makepkg -si
If it gives you a prompt, press “Y” and hit the “Enter” key. Finally, you have installed a package. Now, you can use it.
Use AUR Helpers in Arch Linux
AUR package in Arch Linux also has helper packages that automate the installation processes. There are two helper packages available, Yaourt and Packer. We’ll look at both in detail.
Install Yaourt Helper in Arch Linux
Yaourt stands for Yet AnOther User Repository Tool. To use this helper in Arch Linux, follow the steps given below.
First, open the pacman configuration file using your favorite text editor:
# nano text editor
sudo nano /etc/pacman.conf
# vim text editor
vim nano /etc/pacman.conf
Next, add the following lines at the end of the file:
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
Save the file and exit the editor. And lastly, install the Yaourt helper as shown below:
sudo pacman -Sy yaourt
Use Yaourt Helper to Install Packages
Now that we’ve installed the Yaourt AUR helper, we can use that to install any required package. To install any package, use the Yaourt package followed by the package name. Specifically, type:
yaourt -S packagename
Make sure to replace the packagename with the package you want to install. For example, to install the Chrome package, we’d write:
yaourt -S google-chrome
Output:
Alternatively, you can use the Yaourt helper to update the existing packages. For this step, type:
yaourt -U packagename
Install Packer Helper in Arch Linux
Like the Yaourt package, Packers is also a widely used AUR package helper. However, we’ll have to install it first. Open the command prompt and install the dependencies as shown below:
sudo pacman -S base-devel fakeroot jshon expac git wget
After that, we’ll fetch the PKGBUILD script required for Packer using the wget
command. Specifically, type:
wget https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=packer
Once done, rename the folder to the appropriate name for convenience, as shown below:
mv PKGBUILD\?h\=packer PKGBUILD
After that, we’ll create the package file for Packer. This is the last prerequisite step before the installation of Packer. For this step, use the makepkg
command as shown below:
makepkg
Lastly, we’ll install the Packer from Pacman:
sudo pacman -U packer-*.pkg.tar.xz
And it’s done! You have successfully installed the Packer AUR helper to use AUR in Arch Linux.
Use Packer to Install Packages
Installing AUR packages using Packer is straightforward. To install any package, we’ll simply write the packer command followed by the package name as shown below:
packer -S packagename
For instance, if we want to download the chrome package, we’ll write:
packer -S google-chrome
Packer also allows us to update the existing packages in Arch Linux. For this step, we’ll use the yu
option with the packer command. Specifically, type:
packer -Syu
Get Yay Package in Arch Linux
Another helper we can use to automate the package installation process is the Yay package. The installation process is similar to that of Yaourt and Packer. For the Yay package, we’ll first fetch its directory from AUR. for instance, type:
git clone https://aur.archlinux.org/yay.git
Output:
Change the directory and enter the Yay package folder using the cd
command:
cd yay
Now build the package as shown below:
makepkg -si
If prompted, type “Y” and hit the “Enter” key to build the package successfully. Once the build process is done, you may now use this package to install any package available in AUR. to use this package, type:
yay -Ss package
And that’s a wrap! In this article, we’ve covered how to use AUR in Arch Linux using two methods. We have also discussed the various AUR helpers that you can use to automate the installation and package management process.
However, it is crucial to remember that AUR packages are not Arch Linux official packages. They might not be as stable as the official packages. Make sure to read the feedback and guidelines of the package you wish to install.
If you liked this article, please share it