Home > i.t. > How to use apt-get behind proxy server (Ubuntu/Debian)

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

March 13th, 2006

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!

Administrator i.t.

  1. March 15th, 2006 at 10:18 | #1

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

  2. Administrator
    March 15th, 2006 at 12:17 | #2

    都成动物园了,上一桌麻将啦

  3. xinxin
    March 19th, 2006 at 12:45 | #3

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

  4. whhu
    January 10th, 2008 at 20:44 | #4

    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.

  5. January 11th, 2008 at 08:09 | #5

    reboot is not necessary.
    if you want to use apt-get, just close your terminal, and open a new one.

  1. No trackbacks yet.