macos命令行更换终端代理的方法

1)终端打开nano(这是一个在终端使用的文本编辑器)

bash 复制代码
nano ~/.zshrc

2)修改替换你的最新终端代理

bash 复制代码
https_proxy=http://地址
http_proxy=http://地址
all_proxy=socks5://地址

3)ctrl+o保存,enter回车,ctrl+x退出

4)输入source让上述更改生效

bash 复制代码
source ~/.zshrc

5)验证代理是否成功修改

bash 复制代码
env | grep -i proxy

如果修改成功,就会显示步骤2)的地址

相关推荐
Aftery的博客1 小时前
Xcode运行报错:SDK does not contain ‘libarclite‘ at the path
macos·cocoa·xcode
楚轩努力变强8 小时前
iOS 自动化环境配置指南 (Appium + WebDriverAgent)
javascript·学习·macos·ios·appium·自动化
程序员敲代码吗1 天前
如何通过命令行启动COMSOL的参数化、批处理和集群扫描
java·c#·bash
猫头虎1 天前
如何解决 OpenClaw “Pairing required” 报错:两种官方解决方案详解
网络·windows·网络协议·macos·智能路由器·pip·scipy
dingdingfish1 天前
Bash 学习 - 第1章:Introduction
bash·shell·programming·introduction
皮卡车厘子2 天前
Mac 挂载目录
macos
良逍Ai出海2 天前
在 Windows & macOS 上安装 Claude Code,并使用第三方 Key 的完整教程
windows·macos
热爱生活的五柒2 天前
linux/mac/wsl如何使用claude code,并配置免费的硅基流动API?(官方的需要付费订阅)
linux·运维·macos
xuchaoxin13752 天前
bash中的字符串处理@输出和格式化打印@echo@printf
chrome·bash
xuchaoxin13752 天前
bash@特殊字符@环境变量符号@特殊参数@参数扩展和替换@字符串处理用法总结
开发语言·bash