Challenge, Easy,  on  Linux

Install Linux Packages from Remote Repositories (Debian & Ubuntu Edition)

In this challenge, you'll practice one of the key Linux skills - installing packages from remote repositories.

Task 0: Update the package list

First, you need to update the package list to ensure you have the latest information about the packages available in the repositories.

Hint 1

On Debian and Ubuntu systems, apt-get is the go-to tool for installing software. Run man apt-get and try finding the relevant command to update the package list.

Hint 2

Getting Permission denied error when updating the package list? Make sure you have the necessary permissions to manage packages on your system (e.g. use sudo or run the command as root).

Task 1: Install a package from the official repository

tree is a handy command-line utility that displays directory structures in a tree-like format.

The tree package is available in Ubuntu's official package repository - installing it is just one command away.

Hint 3

It's a simple one. Use apt-get install followed by the package name.

Task 2: Install a package from a third-party repository

Not all software is available in the distribution's official repositories. Many projects maintain their own APT repositories that you can add to your system.

Install GitHub CLI (gh) - a command-line tool for working with GitHub from the terminal.

This package is not in Ubuntu's official repositories, so you'll need to add GitHub's own repository first.

Hint 4

The general process for adding a third-party APT repository is:

  1. Download the repository's GPG signing key
  2. Add the repository to your APT sources
  3. Run apt-get update to fetch the new repository's package list
  4. Install the package with apt-get install

Profit!

Hint 5

Visit the project's installation docs for detailed instructions.