Ubuntu – apt-get behind proxy on VirtualBox Ubuntu

Ubuntuvirtual machinevirtualbox

how can I set apt-get to work behind proxy?

Best Answer

http_proxy="http://host:port" apt-get something

should work.

If you require authentication, try

http_proxy="http://user:pass@host:port" apt-get something

And if you want this to be permenant, you should probably set the http_proxy (and ftp_proxy?) variables in your ~/.bashrc so that all of your proxy-capable applications will work in the future, e.g. 'wget'.

Related Question