33

I am aware that Linux distributions usually have 'package managers' to allow me to download and install software from the command line, and that I should also be able to download and compile source code from the Web. But I am not sure about how best to do either of these things on the Raspberry Pi.

ЯegDwight
  • 101
  • 4
Andrew Fogg
  • 5,913
  • 8
  • 25
  • 28
  • 8
    Discussed this with Andrew, Jivings, dunsmoreb in chat - the plan is to turn this into a wiki beginner's guide of sorts, with an answer for each major system. Feel free to contribute additions or corrections to any of the answers here, but please post a new answer only to document a new platform. – Shog9 Jun 18 '12 at 20:28

4 Answers4

29

Debian

APT is the package manager under Debian, for Raspberry Pi or any other system. The command line tool curl is installed in this example.

You need to be connected to the Internet.

If you haven't done so recently it is worth running,

sudo apt-get update

This updates the list of packages that are available to apt-get.

Then use apt-cache to search for the package that you want to install, in this case,

apt-cache search curl

Every package name or description with the word 'curl' in it will be displayed in a list. This is useful in cases where you are not sure as to the exact name of the package that you want to install.

Once you have the name of the package that you want, install it as follows,

sudo apt-get install curl

If you're not sure what you're looking for or just wish to browse through what's available, you can alternatively use the menu-driven tool Aptitude:

sudo aptitude
Andrew Fogg
  • 5,913
  • 8
  • 25
  • 28
  • 2
    @AndrewFog I dislike the term standard Raspberry Pi. That is a strange assumption. – Jivings Jun 17 '12 at 23:47
  • Might be worth adding how to uninstall too. Also the format of the other answers works really well, being both concise and informative. – Mark Booth Jul 12 '12 at 10:22
7

Arch

Pacman is the package manager used in Arch Linux.

Synchronize Repositories and update System

$ sudo pacman -Syu

Search for a Package

$ pacman -Ss package

Install a Package

$ sudo pacman -S package

Uninstall a Package

$ sudo pacman -R package
Jivings
  • 22,538
  • 11
  • 90
  • 139
4

Fedora

Yum is the default package manager used in Fedora.

Update Installed Packages

yum update

Get Package Information

yum info package

Install New Package

yum install package

Remove Installed Package

yum remove package
0

MINIBIAN

As MINImalistic raspBIAN is, at its heart, still a Debian derivative, the apt tools are the tools of choice for this really cool OS. Thus, almost anything said about Debian also applies to MINIBIAN, except, of course, since it is not only designed to be "mini", but in fact is minimalistic, there will be a lot of "Ign"(ore) messages while running the "apt-get update" command.