Linux Apt-Get Command Not Found - How to Install a Package in Arch Linux?

I am trying to install a command:

$ sudo -s apt-get install net-tools
/bin/bash: apt-get: command not found

How can I install apt-get then?

I use command below to find Out My Linux Distribution Name and Version:

$ cat /etc/*-release

I get this below:

NAME="Arch Linux"
ID=arch
PRETTY_NAME="Arch Linux"
ANSI_COLOR="0;36"
HOME_URL=""
SUPPORT_URL=""
BUG_REPORT_URL=""

Any ideas what should I do to install a command in Arch Linux?

1

7 Answers

First of all, Arch provides a beautiful, well maintained wiki. You may want to read it first before working with Arch. The pre-installed package manager is "pacman".

To install a package from the official repositories, you will need to use it like this:

# pacman -S <package name>

There is also a community maintained version, the Arch User Repository, for packages not part of the official repository.

1

I used this page when I moved to Arch linux, it lists the equivalent commands for various common package managers, including apt and pacman.

For example:

+-----------------------+-------------+----------------+-------------------------+----------------+-----------------+
|        Action         |    Arch     | Red Hat/Fedora |      Debian/Ubuntu      | SLES/openSUSE  |     Gentoo      |
+-----------------------+-------------+----------------+-------------------------+----------------+-----------------+
| Install a package(s)  | pacman -S   | dnf install    | apt install             | zypper install | emerge [-a]     |
| Remove a package(s)   | pacman -Rs  | dnf remove     | apt remove              | zypper remove  | emerge -C       |
| Search for package(s) | pacman -Ss  | dnf search     | apt search              | zypper search  | emerge -S       |
| Upgrade Packages      | pacman -Syu | dnf upgrade    | apt update; apt upgrade | zypper update  | emerge -u world |
| ...                                                                                                               |
2

If you really want to download apt, then:

  1. Install pacaur $ pacman -S pacaur
  2. Install apt, from pacaur (no root) $ pacaur -S apt
  3. Add some repositories
  4. Now you have working apt on arch linux
1

Arch linux does not generally use the apt package manager. It uses pacman:

0

You can't. Arch does not use the apt package system unlike Debian-based linuxes, like Ubuntu. Instead it uses the pacman package manager. However, you should try it out. Using pacman myself, I never had a problem with it, and you can still use it in order to install packages that you can get with the apt package manager.

1

As @Marcus mentioned, pacman is the builtin package manager. However, it won't give you access to AUR packages.

aurman is a nice wrapper that also searches and installs from AUR. yaourt used to be popular but according to the AUR wiki it is insecure and not featurefull. aurman cli works almost exactly like pacman so you can follow a pacman guide just the same. To get aurman:

cd ~/Downloads
git clone 
cd aurman
makepkg -Acs
# Change xxx below to downloaded version
sudo pacman -U aurman-xxx.pkg.tar.xz

Then, you can follow something like which I also pasted into this stackexchange answer here:

aurman can also be found on github:

Arch Linux does NOT use apt or apt-get, instead, however, it uses pacman. the syntax for pacman is quite different than apt-get; it uses -S to install packages instead of install. eg: sudo pacman -S [package].

Learn more at the man page or maybe type --help, wiki:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest