ubuntu给终端加代理服务器

ubuntu给终端加代理

访问google.com 是否可以访问通

curl https://www.google.com

如果访问不通说明代理服务器没有配置好。

使用 gedit ~/.bashrc 打开网络配置

gedit ~/.bashrc

找到文章的最后添加代理

export http_proxy='http://127.0.0.1:7890'
export https_proxy='http://127.0.0.1:7890'

出现 警告忽略

** (gedit:113947): WARNING **: 17:35:54.179: Set document metadata failed: 不支持设置属性 metadata::gedit-position

更新配置

source ~/.bashrc

检查是不是代理添加成功

root@sunyuhua-HKF-WXX:/home/sunyuhua/tools# curl https://www.google.com
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en"><head><meta content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for." name="description"><meta content="noodp" name="robots"><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script nonce="LCVtCDZ0Jiv9pM9xE5EzBw">(function(){var _g={kEI:'cT5TZbdf6NOQ8g_1yp_gDA',kEXPI:'0,795736,569732,206,4804,2316,383,246,5,1129120,1921,1195871,609,380090,16114,28684,22431,1361,12316,4749,12834,4998,17075,38444,2872,2891,3926,213,4210,3405,606,30668,30022,6397,8927,2025,1,16916,2652,4,32894,9871,16852,2980,1457,22601,6636,7596,1,42154,2,16395,342,3533,19491,5679,1021,31121,4569,6258,23418,1252,3
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MonkeyKing.sun

对你有帮助的话,可以打赏

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值