How To Install apt-mirror package on Ubuntu?
This is a tiny utility that allows you to mirror any (or all) of the Debian and Ubuntu GNU/Linux distributions, as well as any other apt sources generally offered by open source developers. This tutorial will walk you through the process of setting up repository mirrors for Ubuntu 20.04 and Ubuntu 18.04. The same procedure applies to each previous Ubuntu Linux version. A compact and effective program for mirroring a portion of or the entire Debian GNU/Linux distribution, as well as any other apt sources.
- It supports different architectures concurrently.
- It is entirely pool compliant.
- It allows for multithreaded downloading.
- It employs a configuration similar to apts <sources.list>.
How To Install apt-mirror on Ubuntu
On Ubuntu 20.04, there are three options for installing apt-mirror. Apt-get, apt, and aptitude are all available. Each strategy of installation will be described in detail in the following sections. You may select any of them.
- Using apt-get to install
- Using aptitude to install
- Using apt to install
Method 1: Using the apt-get command
Step 1: Using the following command, update the apt database using apt-get.
sudo apt-get update
Step 2: After upgrading the apt database, we can use apt-get to install apt-mirror by performing the following command:
sudo apt-get -y install apt-mirror
Method 2: Using apt
Step 1: The apt database will be updated with the command below.
sudo apt update
Step 2: After upgrading the apt database, we can use apt to install app-mirror by performing the following command:
sudo apt -y install apt-mirror
Method 3: Using aptitude
Step 1: If you want to use this method, you may need to install aptitude first because it is not normally installed by default on Ubuntu. Use the following command to update the apt database with aptitude.
sudo aptitude update
Step 2: After upgrading the apt database, we can use aptitude to install apt-mirror by performing the following command:
sudo aptitude -y install apt-mirror
Examples of Apt-Mirror Package in Linux
Example 1: Main Configuration file.
The following command will create the Mirror of the Main Configuration file,
Example 2: Cron Configuration Template
Mirror of Cron configuration template