Monday, September 15, 2008

How to use apt-get / aptitude behind proxy server

if you get internet connection via a proxy server, you might be able you web browser but unable to use apt-get, aptitude or any other APT gui.
To over come this problem,
  1. Edit your /etc/bash.bashrc file as root
  • If you use Kubuntu
sudo kate /etc/bash.bashrc
  • If you use Ubuntu
sudo kate /etc/bash.bashrc

2. Append following two line into your file and save it

export http_proxy=http://user:password@my.proxy.server:port/
export ftp_proxy=http://user:password@my.proxy.server:port/


  • N.B. Replace "user" with your username "password" with your password, "my.proxy.server" with your proxy server address and "port" with your port.
  • If your proxy server doesn't require authentication simply use server address and port
  • Mine is
export http_proxy=http://192.248.16.90:3128/
export ftp_proxy=http://192.248.16.90:3128/
  • Then on console type
source ~/.bashrc
  • to effect the changes

Reference 1:
Reference 2:

No comments: