Question 3.16: You want to install software using the command line....

You want to install software using the command line.

Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

The most used tool for installing software from a Terminal session is apt-get.

The basic format of the command, which you must run as a superuser, is:

$ sudo apt-get install <name of software>

So, for example, to install the AbiWord word processing software, you would enter the command:

$ sudo apt-get install abiword

Discussion

The apt-get package manager uses a list of available software. This list is included with the Raspberry Pi operating system distribution that you use, but is likely to be out-ofdate. So, if the software that you try to install is reported by apt-get as not found, run the following command to update the list:

$ sudo apt-get update

The list and the software packages for installation are all on the Internet, so none of this will work unless your Raspberry Pi has an Internet connection.

If you find that when you update, you get an error like E: Problem with MergeList /var/lib/dpkg/status, try running these commands:

sudo rm /var/lib/dpkg/status
sudo touch /var/lib/dpkg/status

The installation process can often take a while because the files have to be downloaded and installed. Some installations will also add shortcuts to your desktop, or the program groups on your Start menu.

You can search for software to install using the command apt-get search followed by a search string such as abiword. This will then display a list of matching packages that you could install.

See Also

See Recipe 3.17 for removing programs that you no longer need so that you can free up space.

See also Recipe 3.19 for downloading source code from GitHub.

Related Answered Questions

Question: 3.34

Verified Answer:

Use the Linux df command: $ df -h Filesystem   ...
Question: 3.33

Verified Answer:

Use the Linux date command. The date and time form...
Question: 3.32

Verified Answer:

Edit the file ~/.bashrc using nano (Recipe 3.6), a...
Question: 3.31

Verified Answer:

Run the program or command in the background using...
Question: 3.30

Verified Answer:

Redirect the output to /dev/null using >. For e...
Question: 3.24

Verified Answer:

Use the Task Manager utility, which you’ll find on...
Question: 3.29

Verified Answer:

Use the pipe command, which is the bar symbol (|) ...
Question: 3.27

Verified Answer:

Use the > command to redirect output that would...
Question: 3.28

Verified Answer:

Use the cat command to concatenate a number of fil...
Question: 3.26

Verified Answer:

Use the lsusb command. This will list all the devi...