ubuntu:(设置终端代理IP)简单有效地设置全局代理上网

2015年08月10日 其他资源 8条评论 阅读95888次

ubuntu:简单有效地设置全局代理上网


因为要在ubuntu系统上安装很多软件,但ubuntu系统所在的网络环境是需要使用http代理才能连接网络的。

正常使用火狐等浏览器上网时,可以很简单的设置网络代理服务器,但若是在ubuntu的终端中使用sudo apt-get install 。。。这样的命令,浏览器中设置的代理就不能用了,因此我们必须对ubuntu的终端设置代理,使其能够在apt-get install 时联通网络。

 1.通过export http代理使用apt-get(临时有效)

    在使用apt-get之前,在终端中输入以下命令

    export http_proxy=http://proxy_addr:proxy_port

    取消代理使用

    export http_proxy=""

 2.apt.conf文件中配置http代理信息(永久有效)

    sudo gedit /etc/apt/apt.conf在您的apt.conf文件中加入下面这行

    Acquire::http::Proxy "http://proxy_addr:proxy_port";

    保存apt.conf文件即可

 3..bashrc文件中配置代理信息(apt-get, wget 等等)(全局有效)

    gedit ~/.bashrc 在.bashrc文件末尾添加如下内容

    export http_proxy="http://proxy_addr:proxy_port"

    保存文件,重新开启终端。

但我通过上述三种方法均没有成功,但我在系统设置的网络中设置了代理信息,重启终端后,apt-get便可以联通网络能够安装软件了。

有图有真相,具体操作步骤参见下面的图示。

ubuntu系统的右上角设置中的System Settings…

Image

Network设置中,右侧红框内,填入自己相关代理的地址和端口后,保存即可。

Image

提醒:如上保存完代理信息后,终端的窗口要重新打开才会有效的。

分享本文至:

WRITTEN BY

avatar
本文标签:ubuntuproxy
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

8 条评论

  1. avatar 80hhid24

    <a href="http://www.5tqkyfya.com/nike-laufschuh-free-hypervenom-low-wei%C3%9F-schwarz-wei%C3%9F-chaussuresa">nike laufschuh free hypervenom low wei脽 schwarz wei脽</a> <a href="http://www.1v9ssaoa.com/nike-air-max-2017-herre-l%C3%B8b-sko-insert-kurpesg">nike air max 2017 herre l酶b sko insert</a>
    80hhid24 http://www.80hhid24.com/

  2. avatar emergexplanning

    <a href="http://www.cosmonet.net/nike-zoom-kobe-8-a-buon-mercato-scarpeb">nike zoom kobe 8 a buon mercato</a> <a href="http://www.cpgjoblist.net/air-jordan-retro-3-himmelbl%C3%A5-mintgr%C3%B8n-schuhed">air jordan retro 3 himmelbl氓 mintgr酶n</a> <a href="http://www.crosswindschurch.net/air-jordan-super-fly-bleu-rose-butyf">air jordan super fly bleu rose</a> <a href="http://www.cuttingedgeoffers.net/nike-free-run-3-rot-herren-obuve">nike free run 3 rot herren</a> <a href="http://www.cvceurope.net/jordan-retro-10-wolf-gris-and-rojo-obuvg">jordan retro 10 wolf gris and rojo</a> <a href="http://www.cyberlec.net/air-jordan-11-low-retro-university-azul-schuhef">air jordan 11 low retro university azul</a>
    emergexplanning http://www.emergexplanning.net/

  3. avatar mackzy

    <a href="http://www.myoastudies.com/nike-air-foamposite-one-svart-chrome-obuva">nike air foamposite one svart chrome</a> <a href="http://www.reganwhimpey.com/ralph-lauren-chaussures-noir-marine-polot">ralph lauren chaussures noir marine</a> <a href="http://www.segurotiendas.com/yeezy-350-boost-blanco-and-negro-ink-schuhed">yeezy 350 boost blanco and negro ink</a> <a href="http://www.specpilot.com/air-jordan-retro-14-kvinners-r%C3%B8d-gull-scarpec">air jordan retro 14 kvinners r酶d gull</a> <a href="http://www.texaschambers.com/nfl-arizona-cardinals-jersey-nflx">nfl arizona cardinals jersey</a> <a href="http://www.waughjiujitsu.com/cubs-70-joe-maddon-blue-new-cool-base-stitched-mlb-jersey-nflz">cubs 70 joe maddon blue new cool base stitched mlb jersey</a>
    mackzy http://www.mackzy.com/

  4. avatar giaphusolar

    <a href="http://www.googleizate.com/nike-free-3.0-v4-dam%C3%A4nner-light-gr%C3%BCn-discharge-kurpesd">nike free 3.0 v4 dam盲nner light gr眉n discharge</a> <a href="http://www.kainstory.com/ralph-lauren-herren-down-vest-polos">ralph lauren herren down vest</a> <a href="http://www.matulat.com/roshe-run-qs-bianca-label-england-colors-butyf">roshe run qs bianca label england colors</a> <a href="http://www.noteplays.com/kvinders-big-pony-polo-fl%C3%A5den-gr%C3%A5-polou">kvinders big pony polo fl氓den gr氓</a> <a href="http://www.boozewrestler.com/kvinders-nike-sb-stefan-janoski-max-sort-gr%C3%A5-chaussurese">kvinders nike sb stefan janoski max sort gr氓</a> <a href="http://www.dandrehobl.com/nike-free-3.0-v5-maschio-nero-pelle-scarpef">nike free 3.0 v5 maschio nero pelle</a>
    giaphusolar http://www.giaphusolar.com/

  5. avatar lepenequet

    <a href="http://www.ontariozillow.com/ralph-lauren-hoodies-noir-bleu-polot">ralph lauren hoodies noir bleu</a> <a href="http://www.qtbymary.com/darrell-green-washington-redskins-womens-game-nike-jersey-white-nflz">darrell green washington redskins womens game nike jersey white</a> <a href="http://www.rxforri.com/nike-zoom-winflo-3-shield-dam%C3%A4nner-laufen-schuh-kurpesd">nike zoom winflo 3 shield dam盲nner laufen schuh</a> <a href="http://www.tracithrasher.com/nfl-jake-matthews-mens-limited-red-jersey-70-atlanta-falcons-nike-rush-drift-fashion-nflz">nfl jake matthews mens limited red jersey 70 atlanta falcons nike rush drift fashion</a> <a href="http://www.aesqpharm.com/jordan-retro-13-infrarosso-for-vendita-obuve">jordan retro 13 infrarosso for vendita</a> <a href="http://www.capitanleston.com/nike-tanjun-ladies-trainers-gr%C3%A5-kitchen-scarped">nike tanjun ladies trainers gr氓 kitchen</a>
    lepenequet http://www.lepenequet.com/

  6. avatar iptvpackage

    <a href="http://www.offgridac.com/nike-air-max-1-lyser%C3%B8d-office-kurpesa">nike air max 1 lyser酶d office</a> <a href="http://www.whylux.com/asics-onitsuka-tiger-mexico-66-gr%C3%B8n-hvid-butyf">asics onitsuka tiger mexico 66 gr酶n hvid</a> <a href="http://www.aouladmhand.com/mens-nike-new-york-jets-48-jordan-jenkins-limited-green-therma-long-sleeve-nfl-jersey-nflw">mens nike new york jets 48 jordan jenkins limited green therma long sleeve nfl jersey</a> <a href="http://www.bukafalar.com/lebron-13-lilla-and-gull-bar-butye">lebron 13 lilla and gull bar</a> <a href="http://www.drgnatarajan.com/nike-kobe-8-plata-verde-kurpesd">nike kobe 8 plata verde</a> <a href="http://www.ideasevoke.com/dam%C3%A4nner-ralph-lauren-pony-schwarz-lila-polos">dam盲nner ralph lauren pony schwarz lila</a>
    iptvpackage http://www.iptvpackage.com/

  7. avatar littlehaleh

    <a href="http://www.marieebeaute.com/limited-joe-montana-san-francisco-49ers-youth-jersey-16-therma-long-sleeve-nike-nfl-red-nflr">limited joe montana san francisco 49ers youth jersey 16 therma long sleeve nike nfl red</a> <a href="http://www.perialetheia.com/russell-westbrook-jersey-for-sale-nflw">russell westbrook jersey for sale</a> <a href="http://www.dentaleden.com/alle-blau-nike-air-force-1-schuheg">alle blau nike air force 1</a> <a href="http://www.freerentalapp.com/kd-7-arancia-and-verde-knight-scarpef">kd 7 arancia and verde knight</a> <a href="http://www.hmttour.com/nike-roshe-run-lyser%C3%B8d-sail-kurpesf">nike roshe run lyser酶d sail</a> <a href="http://www.honestmentor.com/nike-air-max-2016-sort-orange-female-schuheg">nike air max 2016 sort orange female</a>
    [url=http://www.littlehaleh.com/]littlehaleh[/url]

  8. avatar 6klngb19

    <a href="http://www.ehbnzb84.com/femminile-air-yeezy-ii-2-sp-max-90-bianca-butya">femminile air yeezy ii 2 sp max 90 bianca</a> <a href="http://www.n1jvmtjv.com/k%C3%B8be-air-max-97-billig-obuvd">k酶be air max 97 billig</a> <a href="http://www.r2g427lp.com/puma-mesh-surface-scarpec">puma mesh surface</a> <a href="http://www.cv9uzx13.com/nike-air-presto-flyknit-svart-keys-schuhef">nike air presto flyknit svart keys</a> <a href="http://www.pqphql39.com/air-jordan-11-brouge-acheter-online-scarpef">air jordan 11 brouge acheter online</a> <a href="http://www.8z1143o9.com/kvinders-air-jordan-retro-9-gr%C3%A5-gul-scarpeg">kvinders air jordan retro 9 gr氓 gul</a>
    6klngb19 http://www.6klngb19.com/

欢迎留言




用户登录

sitemap