Linux 配置系统全局代理

在Linux系统中设置全局代理,可以按照以下步骤进行操作:

编辑环境变量配置文件

sudo vi /etc/profile

文件末尾添加以下内容,将代理地址和端口替换为实际的代理地址和端口:

export http_proxy=http://代理地址:端口
export https_proxy=http://代理地址:端口
export ftp_proxy=http://代理地址:端口
export no_proxy=localhost,127.0.0.1

保存并退出编辑器,然后执行以下命令使配置文件实时生效:

source /etc/profile

验证

echo $http_proxy

如果输出的内容为代理地址和端口,则说明全局代理设置成功。

0

  1. This post has no comment yet

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

使用DLVM本地部署DeepSeek(补充)
使用DLVM本地部署DeepSeek(补充)
Linux 6 张图
Error response from daemon: Get “https://registry-1.docker.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Error response from daemon: Get “https://registry-1.docker.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Linux 2 张图
MySQL 30周年庆 OCP 认证免费
MySQL 30周年庆 OCP 认证免费
Linux 5 张图
使用Kubeadm在Ubuntu 20.04中部署Kubernetes
使用Kubeadm在Ubuntu 20.04中部署Kubernetes
Linux 24 张图
在Linux上安装和配置Squid代理服务器
在Linux上安装和配置Squid代理服务器
Linux 10 张图
Wifipumpkin3 安装记录
Wifipumpkin3 安装记录
Linux 1 张图
© 2025 诺诺博客如有侵权请联系删除 | 网站地图 | 百度统计 | 又拍云CDN加速
为了获得更好的浏览效果 建议您使用IE8.0及以上版本浏览器登陆本站点 · 服务器托管于腾讯云