Tuesday, May 26, 2009

Ubuntu: Use apt-get through a proxy

You can set proxy settings in the Synaptic package manager but these don't seem to affect apt-get. To get apt-get to work through a proxy do:
sudo nano /etc/bash.bashrc
At the end of the file add:
export http_proxy=http://username:password@proxyserver:port/
export ftp_proxy=http://username:password@proxyserver:port/
If your proxy server does not require authentication then leave out the username:password@

You'll need to open a new terminal for it to take effect.

No comments: