how to setup proxy for apt in ubuntu / debian

0
(0)

Aptitude will not use the HTTP Proxy environment variables. Instead, it has its own configuration file where you can set your proxy. This tutorial will show you how to set the proxy so that you may be able to install and update packages from remote repos.

If you filled in your proxy information during installation, the Apt configuration file would have been automatically updated. However, if you did not, then you must follow the following instructions.

Creating  an Apt Proxy Conf File

Apt loads all configuration files under /etc/apt/apt.conf.d. We can create a configuration specifically for our proxy there, keeping it separate from all other configurations.

Create a new configuration file named proxy.conf.

touch /etc/apt/apt.conf.d/proxy.conf

Add the following line to set your HTTP proxy.

Acquire::http::Proxy "http://user:[email protected]:port/";
Acquire::https::Proxy "http://user:[email protected]:port/";

Save file. And run

apt-get update

Similar Posts:

576

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top