Linux – apt-get with proxy

June 11th, 2009 by Miguel Ferreira | In: Debian

How many, I also never recall some basic things in linux, as I have been testing some virtual machines and how they are basically all the same, one solution is to pass the requests of these by a proxy, but as? No longer reminded me of how to configure apt to use a proxy, I searched on google and after a few failed tests found 🙂 :

Edit the file “//etc/apt/apt.conf.d/70debconf” and add the following:

Acquire {
http {
Proxy “http://user:pass @ YourProxyServer:door/”;
No-Cache “false”;
Max-Age “86400”;
In-Store “false”;

Close and is already 🙂

Another way is to configure the whole system (from the user's point of view) to use a specific proxy, and this makes as follows:

Edit the file ~/.bashrc

and at the end paste:

export http_proxy = http://user:pass @ proxy:port/
export ftp_proxy = http://user:pass @ proxy:port/

Close, log out and login and you're done.

Tags: , , , ,