Mac terminal 每次打开都要重新配置文件

1. 问题描述


每次打开 Terminal,base_profile文件中配置的内容就不生效,需要重新执行source ~/.bash_profile才可以使用。

2. 原因分析


zsh加载的是~/.zshrc文件,而.zshrc 文件中并没有定义任务环境变量。

3. 解决办法


~/.zshrc文件末尾添加以下语句(打开命令 open -e .zshrc)

复制代码
source ~/.bash_profile

​编辑

最新内容​

相关推荐
Teleger13 小时前
蓝牙 MAC 扫描匹配器
macos
刘婉晴14 小时前
【漏扫工具篇】Mac 系统上 Xray 的安装与使用
macos
寒水馨1 天前
macOS下载、安装PowerShell-v7.6.4(附安装包powershell-7.6.4-osx-arm64.pkg)
macos·自动化·跨平台·shell·脚本·命令行·powershell
星辰即远方2 天前
天气预报总结
macos·ios·objective-c·cocoa
xixiaoyunya2 天前
Mac远程访问新范式:基于80KM穿云箭的内网穿透技术实践
macos
秋雨梧桐叶落莳2 天前
计算器仿写总结
学习·macos·ios·objective-c·cocoa
寒水馨3 天前
macOS下载、安装uv-0.12.0(附安装包uv-aarch64-apple-darwin.tar.gz)
python·macos·rust·项目管理·包管理器·astral·pip替代
寒水馨3 天前
macOS下载、安装protobuf-v35.1(附安装包protoc-35.1-osx-universal_binary.zip)
macos·google·grpc·序列化·protobuf·protoc·数据交换
寒水馨3 天前
macOS下载、安装ripgrep-15.2.0(附安装包ripgrep-15.2.0-aarch64-apple-darwin.tar.gz)
macos·正则表达式·rust·ripgrep·rg·命令行搜索·代码搜索
起司喵喵4 天前
Flutter-MacOS桌面OS系统|flutter.+window_manager客户端OS模板
flutter·macos·策略模式