Arch Linux is one of the popular Desktop Operating systems. Its main pros revolve around large communities and thousands of packages that can be installed on Arch Linux, both from official repositories and from AUR.
AUR is a community-driven repository for Arch Linux users. It was created with the intention to make it easy to share community packages in an organized manner. AUR contains package descriptions called PKGBUILDs which allow you to compile a package from source with makepkg.
For you to install a package on Arch Linux from AUR, you need a helper tool that automates the process of building and installing the package.
1. Installing Packages on Arch Linux using Pacman
Arch Linux comes with a default package manager tool calledPacmanwhich usestarto package applications. Pacman works seamlessly withArch Build System.
To install a package with Pacman, use-Soption. The example below will install vlc and elinks packages on Arch using pacman:
sudo pacman-S vlc elinks
Get details about the installed package using-Qi
$ pacman -Qi elinksName : elinksVersion : 0.13-19Description : An advanced and well-established feature-rich text mode webbrowser.Architecture : x86_64URL : http://elinks.or.czLicenses : GPLGroups : NoneProvides : NoneDepends On : bzip2 expat>=2.0 gpm>=1.20.4 openssl lua51 libidn gc trezlibOptional Deps : NoneRequired By : NoneOptional For : rangerConflicts With : NoneReplaces : NoneInstalled Size : 2.58 MiBPackager : Kyle Keen <[emailprotected]>Build Date : Wed 12 Jul 2017 05:56:21 AM EATInstall Date : Sun 17 Jun 2018 01:56:25 PM EATInstall Reason : Explicitly installedInstall Script : NoValidated By : Signature
To remove the package, use-Roption
$ sudo pacman -R elinkschecking dependencies...:: ranger optionally requires elinks: for previews of html pagesPackages (1) elinks-0.13-19Total Removed Size: 2.58 MiB:: Do you want to remove these packages? [Y/n] y:: Processing package changes...(1/1) removing elinks [##########################] 100%:: Running post-transaction hooks...(1/2) Arming ConditionNeedsUpdate...(2/2) Updating the desktop file MIME type cache...$ pacman -Qi elinks error: package 'elinks' was not found
2. Installing Packages on Arch Linux using yaourt
yaourt is a pacman wrapper with extended features and AUR support. The package can be installed using pacman, unlike other pacman wrappers which are mostly packages as AUR builds. yaourt depends ondiffutils, pacman>=5.0, package-query>=1.8 and gettext.
Before you can install yaourt, you need to enable the use of community repos on Arch
sudo vim /etc/pacman.conf
Add below content:
[archlinuxfr]SigLevel = NeverServer = http://repo.archlinux.fr/$arch
Install yaourt:
sudo pacman -Sy yaourt
-y option is used to sync package content list.
To install a package with AUR use:
yaourt -S <package-name>
You can then search for packages on AUR:
yaourt <package-name>
Example:
yaourt vlc
It will give you an easy way to install the package by picking a number on the list. Input package numberon the list and press<Enter>key.
3. Installing Packages on Arch Linux using packer
Packer is one of manypacman wrappers that can be used to install packages from AUR. To install packer on Arch Linux you can use another AUR helper like yaourt or build the package yourself. If you have yaourt already installed, install packer from it by running:
yaourt -S packer --noconfirm
The --noconfirmis used to silence questions prompts. It will answer all for you.
Theyaourt is available from the official Arch repo. It can be installed with pacman:
sudo pacman-S yaourt
Once the package has been installed, you can start using it to manage packages on Arch Linux. One advantage of packer over AUR is that it doesn't need sudo privileges. You can do package installation and removal using your normal user account.
As an example, install elinks and vlc as we did with pacman using the commands:
packer -S vlc elinks
If you want to upgrade all packages including ones from the AUR:
packer -Syu
To remove a package, pass similar options as for pacman.
packer -R elinks
4. Installing Packages on Arch Linux using aurman
Aurman can be installed in two ways:
- Using another AUR helper - yaourt, pacaur e.t.c
- By manually buildingpkg.tar.xz and installing using pacman.
Install aurman from AUR with yaourt:
sudo pacman -S yaourt gityaourt -S aurman
Install aurman by buildingpkg.tar.xz package
$ cd /tmp$ git clone https://aur.archlinux.org/aurman.gitCloning into 'aurman'...remote: Counting objects: 132, done.remote: Compressing objects: 100% (86/86), done.remote: Total 132 (delta 64), reused 110 (delta 46)Receiving objects: 100% (132/132), 11.09 KiB | 1.85 MiB/s, done.Resolving deltas: 100% (64/64), done.$ cd aurman$ makepkg -Acs$ sudo pacman -U aurman-xxx.pkg.tar.xz
Installing a package manager is done by using the following syntax:
aurman -S <package-name>
Conclusion
In this guide, we learned how to install packages on Arch Linux. This will work fine both for Desktop/Server centric Arch operating systems.
For more command options, refer to each package official documentation. A great place for reference is Pacman Documentation.