How to use apt-get behind proxy server (Ubuntu/Debian)

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/synaptic behind
proxy server/firewall which under normal circumstances, you’re unable to
use apt-get.

If you’re using Synaptic

Open up your Synaptic package manager (usually as root), go to
Settings-> Preference -> Network. Enter your proxy server details
like : username:password@proxyserver.net, and put the proxy server port
(usually 8080).

If you’re using command-line apt-get

Edit your /etc/bash.bashrc file as root.

Put these 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/

You can omit the username:password, if your proxy server has no
password. That’s all for today! Happy apt-get-ing!

5 thoughts on “How to use apt-get behind proxy server (Ubuntu/Debian)

  1. 飞飞,你还记得欠我们家狗狗10斤狗粮,和我的一缸鱼,我们家现在又多了只猪,所以你还要买10斤猪食!!!!!

  2. 都是程序。。。写点其它的嘛。。。今天在你们chinaren校友录上看到你小学(看样子像小学)照片。。小时候还挺帅的嘛。。

  3. it that need to reboot the system after set the proxy?
    i cant input chinese, no chinese input methods available when it can do with apt-get throughh the proxy.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>