How to Install Packages on Arch Linux (2024)

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
How to Install Packages on Arch Linux (1)

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:

  1. Using another AUR helper - yaourt, pacaur e.t.c
  2. 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.

How to Install Packages on Arch Linux (2024)

FAQs

How to install required packages in Linux? ›

Step 1: Open the terminal using the keys CTRL+ALT+T or by searching the terminal in the start menu.
  1. Terminal. Step 2: To install 'dpkg' in Debian, we are using 'apt-get' which is another package manager. ...
  2. Terminal. Step 2: To install 'apt' in Ubuntu. ...
  3. sudo apt-get update. ...
  4. Install the downloaded 'apt' package.
Dec 8, 2023

How to install apt packages in Arch? ›

Enable snaps on Arch Linux and install apt-mirror
  1. Enable snaps on Arch Linux and install apt-mirror. ...
  2. On Arch Linux, snap can be installed from the Arch User Repository (AUR). ...
  3. If AppArmor is enabled in your system, enable the service which loads AppArmor profiles for snaps:
May 14, 2023

How to install Arch Linux properly? ›

How to Install Arch Linux
  1. Step 1 — Download & Boot Arch Linux. ...
  2. Step 2 — Prepare the Installation. ...
  3. Step 3 — Partition the Disk (UEFI Systems Only) ...
  4. Step 4 — Partition the Disk (MBR Systems Only) ...
  5. Step 5 — Install the Base Packages (UEFI and MBR Systems) ...
  6. Step 6 — Start the Arch Linux Installation.
Aug 24, 2023

How to install Linux packages from a file? ›

Once you've determined that you want to install the package, use sudo dnf install packagename to download and install the package. Remove a package. If you want to uninstall something you installed using DNF or Yum, use sudo dnf remove packagename .

Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 5418

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.