Using apt-fast to accelerate installation of Debian packages

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Locating Fast Servers

Use the command:

sudo netselect-apt -t 5

to find the five fastest servers in your environment (Figure 3), and add them to the configuration file. If you come up with other servers during testing, then you should use these. Copy the modified configuration file named apt-fast.conf to /etc/ and assign appropriate access rights to the file using:

sudo chown root:root /etc/apt-fast
Figure 3: Netselect-apt selects the fastest servers in your area.

If you want to always use apt-fast, it is a good idea to set up an alias in /etc/bash.bashrc . You can do this with the following command:

$ sudo echo "alias apt='apt-fast'" >> /etc/bash.bashrc

Now you can use apt-fast, for example, by entering apt install <Package> or apt dist-upgrade . Depending on your preferences, you could also do something like convert the configuration file from apt-get to the newer Apt, thus adding a feature such as a progress indicator.

Editing apt-fast.conf

This is done by replacing apt-get with the editor of your choice in the apt-fast.conf file, which you copied previously. You should go to the #_APTMGR line and insert /usr/bin/apt or, if you prefer, also /usr/bin/aptitude . In order to activate this line, you should remove the hash sign # at the beginning of the line before saving. The commentary in /etc/apt-fast.conf (shown in Figure 4) describes how to exchange the mirror server.

Figure 4: The control file /etc/apt-fast.conf contains numerous useful examples for configuring apt-fast.

Now you can use apt-fast with the fastest Debian and Ubuntu servers in your area and download packages in parallel with multiple connections. The syntax is identical to that of apt-get, except you use apt-fast with install , remove , upgrade , and dist-upgrade , and so on. Or you can use the alias that you defined before.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content