Linux

Run apt-get behind proxy server – Ubuntu 8.04 LTS Server

If you are a Debian-based GNU/Linux user, then you’re probably familiar with synaptic and apt-get to install application from software repositories. This post focussed on how to use apt-get behind proxy server/firewall which under normal circumstances, you’re unable to use apt-get.

If you’re using command-line apt-get

Edit your /etc/bash.bashrc file as root.
You can use pico or vim to edit…

>sudo vim /etc/bash.bashrc

Press ‘i’ to insert line at the end of your /etc/bash.bashrc file :

export http_proxy=http://username:password@proxyserver.net:port/
export ftp_proxy=http://username:password@proxyserver.netport/

Thens press ‘ESC’ key and type ‘:wq’ to save the file and quit from vim

You can omit the username:password, if your proxy server has no password.

http_proxy=http://username:password@host:port/

Referense:
Ubuntu Forum
http://blog.mypapit.net/2006/02/how-to-use-apt-get-behind-proxy-server-ubuntudebian.html