apt-get behind a proxy

by
Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg

Question : How  to  execute  the  apt-get  behind  a  proxy ?



Answer :

Follow the steps bellow to be able to execute apt-get behind a proxy:

$ cd /etc/apt
$ sudo vi  apt.conf

and  remove   this  :

Acquire::http::Proxy "false";

add this  to the  file :

Acquire::http::Proxy "http://user:pass@proxy_host:port";

 

Now  export   the  proxy   line  with

export http_proxy=http://user:pass@proxy_host:port

to  make  this   command  permanent   add  it  to  ~/.bash.rc  in your  home  directory

vi ~/.bash.rc

 

Now  restart   the  updates :

sudo aptitude update

 

Enjoy

 

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg