apt-get behind a proxy


Please shareShare on Facebook0Share on Google+0Tweet about this on Twitter0Share on LinkedIn0Share on Reddit0Digg thisShare on StumbleUpon0Share on VKBuffer this page

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