Set proxy in apt.conf

In recent Ubuntu/Debian version proxy set through Network Proxy wont work for apt-get module.

To set proxy server for apt-get module you need to add following code in /etc/apt/apt.conf

Acquire {
Retries "0";
HTTP {
Proxy "http://proxy.example.com:8080";
};
};
Acquire::ftp::proxy "ftp://proxy.example.com:8080/";
Acquire::https::proxy "https://proxy.example.com:8080/";

Where proxy.example.com is the proxy hostname, and 8080 is proxy port.

-Sany

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s