Thursday, May 3, 2012

How to configure apt-get command to let work behind proxy on Ubuntu 11

apt-get doesn't send packet via system proxy which you might have set in system setting, you need to put it manually.It require to create one file on "/etc/apt/apt.conf" You just create file and type 3 lines and save it, that's it.
/etc/apt$ sudo vi apt.conf

1.type in below
Acquire::http::proxy "http://[[user][:pass]@]host[:port]/";
Acquire::ftp::proxy "ftp://[[user][:pass]@]host[:port]/";
Acquire::https::proxy "https://[[user][:pass]@]host[:port]/";

Actual example from my configuration
Acquire::http::proxy "http://192.168.0.1:8080/";
Acquire::ftp::proxy "ftp://192.168.0.1:8080/";  
Acquire::https::proxy "https://192.168.0.1:8080/";

2.save it, if you don't feel comfortable to use vi, you can use any text editor.
:wq!

※More detail information
man apt.conf

No comments:

Post a Comment