mac Terminal config proxy 【mac 终端配置代理】

bash 复制代码
vi ~/.bash_profile
alias proxy='export http_proxy=127.0.0.1:1088;export https_proxy=$http_proxy'
alias proxyOff='unset http_proxy;unset https_proxy'

生效

bash 复制代码
source ~/.bash_profile

而从 macOS Catalina 版开始,Mac 将使用 zsh 作为默认的 Shell 终端。要对其进行配置,首先执行如下命令修改用户全局配置文件:

1

bash 复制代码
vi ~/.zshrc
alias proxy='export all_proxy=socks5://127.0.0.1:1080'
alias unproxy='unset all_proxy'
bash 复制代码
source ~/.zshrc
相关推荐
寒水馨18 分钟前
macOS下载、安装protobuf-v35.1(附安装包protoc-35.1-osx-universal_binary.zip)
macos·google·grpc·序列化·protobuf·protoc·数据交换
寒水馨26 分钟前
macOS下载、安装ripgrep-15.2.0(附安装包ripgrep-15.2.0-aarch64-apple-darwin.tar.gz)
macos·正则表达式·rust·ripgrep·rg·命令行搜索·代码搜索
起司喵喵1 天前
Flutter-MacOS桌面OS系统|flutter.+window_manager客户端OS模板
flutter·macos·策略模式
代码对我眨眼睛1 天前
macOS Google Chrome 常用快捷键
前端·chrome·macos
啊真真真1 天前
macOS下libnfc ..写卡失败问题及解决方案
macos·策略模式
叶 落1 天前
Mac 通过 Miniconda 安装 Python
python·macos·conda·miniconda
it-电商达人2 天前
告别手动对齐!Mac播放器Popvee Player支持本地AI自动生成字幕
人工智能·macos
2501_916008892 天前
iOS IPA文件反编译与打包操作方法,拆包分析防护和加固打包
android·macos·ios·小程序·uni-app·cocoa·iphone
凯丨2 天前
2GB 内存跑 Gemma 4 26B 模型:TurboFieldfare Mac 本地部署实测(2026 最新)
macos
for_ever_love__2 天前
iOS:天气预报仿写总结
macos·ui·ios·objective-c·cocoa