【发布时间】:2011-10-08 17:43:13
【问题描述】:
我将在我的计算机上设置 mySQl 的路径(我正在运行 Snow Leopard),但我在网上看到不同的说明。
有人说要更改 .profile 文件,有些人说要更改 .bash_profile 文件。有什么区别?
【问题讨论】:
标签: macos terminal .bash-profile
我将在我的计算机上设置 mySQl 的路径(我正在运行 Snow Leopard),但我在网上看到不同的说明。
有人说要更改 .profile 文件,有些人说要更改 .bash_profile 文件。有什么区别?
【问题讨论】:
标签: macos terminal .bash-profile
我相信 mac OS X 环境会按此顺序检查.bash_profile、.bash_login、.profile。它会运行层次结构中最高的那个,所以,如果你有.bash_profile,它不会检查.profile。
【讨论】:
.profile 与 sh 或 bash 一起使用。但是.bash_profile 是特定于 bash 的,如果存在.profile,它将覆盖。
【讨论】:
.bashrc文件什么时候会按顺序执行?
.bash_profile 中添加source ~/.bashrc。