如何为Linux配置全局代理,以Debian为例

方法一

添加代理设置,添加环境变量

export http_proxy="http://127.0.0.1:8123"
export https_proxy="http://127.0.0.1:8123"
source /etc/profile

取消代理

    unset http_proxy
    unset https_proxy​

    方法二

    或者将以下内容写入.bashrc中

    export http_proxy="http://127.0.0.1:8123"
    export https_proxy="http://127.0.0.1:8123"
    source /root/.bashrc

    如果要取消,注视掉这两行exprot之后,再重载环境变量即可

      #export http_proxy="http://127.0.0.1:8123"
      #export https_proxy="http://127.0.0.1:8123"
      source /root/.bashrc

       

      版权声明:
      作者:wkweb
      链接:https://www.wkweb.cn/532.html
      来源:哇咔资源网
      文章版权归作者所有,未经允许请勿转载。

      THE END
      分享
      二维码
      海报
      如何为Linux配置全局代理,以Debian为例
      方法一 添加代理设置,添加环境变量 export http_proxy="http://127.0.0.1:8123" export https_proxy="http://127.0.0.1:8123" source /etc/profile 取消代……
      <<上一篇
      下一篇>>