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

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

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
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

13 条评论

  1. <a href="http://www.dandoelroll.com/nike-magista-obra-fg-acc-high-tops-azul-amarillo-negro-scarpeg">nike magista obra fg acc high tops azul amarillo negro</a> <a href="http://www.europeankb.com/under-armour-curry-1-low-gris-blanc-kurpesf">under armour curry 1 low gris blanc</a> <a href="http://www.intercashgold.com/adidas-damian-lillard-bianca-collar-schuheg">adidas damian lillard bianca collar</a> <a href="http://www.kathimartuza.com/air-jordan-reveal-blau-gr%C3%BCn-schuheb">air jordan reveal blau gr眉n</a> <a href="http://www.royalokavango.com/nike-lunar-gato-rosa-chaussuresd">nike lunar gato rosa</a> <a href="http://www.thewebmaestra.com/free-og-14-br-argento-rosa-butyg">free og 14 br argento rosa</a>
    modnypixel http://www.modnypixel.com/

  2. <a href="http://www.dbievents.com/le-coq-sportif-m%C3%A4nner-schwarz-gelb-colour-bar-schuheh">le coq sportif m盲nner schwarz gelb colour bar</a> <a href="http://www.ilankocaeli.com/2014-nike-air-yeezy-ii-2-sp-max-90-the-devil-series-west-men-light-grey-shoesk">2014 nike air yeezy ii 2 sp max 90 the devil series west men light grey</a> <a href="http://www.msignworx.com/nike-kyrie-4-kvinder-confetti-skol">nike kyrie 4 kvinder confetti</a> <a href="http://www.dianegrams.com/menn-nike-dunk-low-royal-bl%C3%A5-obuvk">menn nike dunk low royal bl氓</a> <a href="http://www.jobstodayng.com/nike-mercurial-nero-and-oro-scarpei">nike mercurial nero and oro</a> <a href="http://www.hardcoreboris.com/nike-cortez-rosado-and-negro-zapatosh">nike cortez rosado and negro</a>
    celudela http://www.celudela.com/

  3. avatar ucllnl

    <a href="http://www.accsmonnaux.com/nike-kd-9-lila-blau-kurpesf">nike kd 9 lila blau</a> <a href="http://www.acrosstheory.com/adidas-neo-lazy-mintgr%C3%B8n-obuvb">adidas neo lazy mintgr酶n</a> <a href="http://www.dlhiphop.com/nike-kobe-9-masterpiece-for-verkauf-online-butya">nike kobe 9 masterpiece for verkauf online</a> <a href="http://www.festivalstayz.com/mens-nike-miami-dolphins-20-reshad-jones-aqua-green-alternate-vapor-untouchable-limited-player-nfl-jersey-nflu">mens nike miami dolphins 20 reshad jones aqua green alternate vapor untouchable limited player nfl jersey</a> <a href="http://www.floornhome.com/air-max-1-ltr-sneaker-sort-hvid-dark-gr%C3%A5-kurpesb">air max 1 ltr sneaker sort hvid dark gr氓</a> <a href="http://www.iranqnap.com/nike-tiempo-legend-vert-card-schuhec">nike tiempo legend vert card</a>
    ucllnl http://www.ucllnl.com/

  4. avatar mintyschoice

    <a href="http://www.shiftcampus.com/nike-air-max-zero-armada-azul-zapatosk">nike air max zero armada azul</a> <a href="http://www.fiestanetwork.com/adidas-neo-leather-green-sky-blue-shoesi">adidas neo leather green sky blue</a> <a href="http://www.sunbeltsaves.com/nike-air-flight-89-gelb-orangen-schuhei">nike air flight 89 gelb orangen</a> <a href="http://www.drmastella.com/nike-free-run-5-junior-negro-zapatosp">nike free run 5 junior negro</a> <a href="http://www.khzrubber.com/kyrie-1-herre-gr%C3%A5-skoi">kyrie 1 herre gr氓</a> <a href="http://www.jkdeskisehir.com/kd-8-triple-svart-obuvq">kd 8 triple svart</a>
    mintyschoice http://www.mintyschoice.com/

  5. avatar annomaplexel

    <a href="http://www.kainjipark.com/nike-free-rn-toddler-verkauf-january-2016-kurpesc">nike free rn toddler verkauf january 2016</a> <a href="http://www.lapthelakes.com/ray-ban-womens-vagabond-cat-eye-polarized-sunglasses-glasses-sunglassesc">ray ban womens vagabond cat eye polarized sunglasses glasses</a> <a href="http://www.delmaroffice.com/nike-mens-joey-bosa-limited-red-jersey-los-angeles-chargers-nfl-99-2018-pro-bowl-nflr">nike mens joey bosa limited red jersey los angeles chargers nfl 99 2018 pro bowl</a> <a href="http://www.medieneinsatz.com/nike-free-flyknit-5.0-plus-for-sale-skoa">nike free flyknit 5.0 plus for sale</a> <a href="http://www.linexcanton.com/nike-flyknit-trainer-volt-green-mount-sneakerf">nike flyknit trainer volt green mount</a> <a href="http://www.saskostomy.com/nike-flyknit-lunar-3-p%C3%BArpura-door-kurpesa">nike flyknit lunar 3 p煤rpura door</a>
    annomaplexel http://www.annomaplexel.com/

  6. 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/

  7. 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/

  8. 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/

  9. 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/

  10. 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/

  11. 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/

  12. 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]

  13. 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