ubuntu给终端加代理服务器
  2OAa79iHhyoO 2023年12月11日 27 0


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


【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年12月11日 0

暂无评论

2OAa79iHhyoO