How to make apt-get work through proxy in Ubuntu Precise

since changing the http_proxy, https_proxy and ftp_proxy environment variables didn’t work out with me, I had to search and find another way, and it worked flawlessly:

1- Add a new file with name “80proxy” to “/etc/apt/apt.conf.d”, e.g. “vi /etc/apt/apt.conf.d/80proxy”
2- Add the following lines:

Acquire::http::proxy “http://<proxy&gt;:<port>/”;
Acquire::ftp::proxy “ftp://<proxy>:<port>/”;
Acquire::https::proxy “https://<proxy&gt;:<port>/”;

3- That’s it, now I’m a happy apt-get user :))

 

 

 

About SoCRaT

Software Engineer, OSS & Linux Geek
This entry was posted in Ubuntu and tagged , , , . Bookmark the permalink.

One Response to How to make apt-get work through proxy in Ubuntu Precise

  1. harish charan says:

    not working for me 😦

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