Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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="https://www.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"

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

like image 263
Run Avatar asked Feb 11 '16 15:02

Run


4 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.

like image 121
Marcus Avatar answered Sep 16 '22 14:09

Marcus


I used this page https://wiki.archlinux.org/index.php/Pacman_Rosetta 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 |
| ...                                                                                                               |
like image 28
Hany Alsamman Avatar answered Sep 17 '22 14:09

Hany Alsamman


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
like image 25
M KJJJ Avatar answered Sep 19 '22 14:09

M KJJJ


Arch linux does not generally use the apt package manager. It uses pacman: https://wiki.archlinux.org/index.php/Pacman

like image 20
PenguMC Avatar answered Sep 18 '22 14:09

PenguMC