最近在学习unix,学到bash的时候发现它总是不读取~/.bashrc。
因为Mac OS X上的bash是通过login的方式运行的,而man bash中写着,通过login方式登录的bash不会读取~/.bashrc。
解决方法:把下面的代码 添加到 ~/.bash_profile中。
<!-- lang: shell -->
source ~/.bashrc
最近在学习unix,学到bash的时候发现它总是不读取~/.bashrc。
因为Mac OS X上的bash是通过login的方式运行的,而man bash中写着,通过login方式登录的bash不会读取~/.bashrc。
解决方法:把下面的代码 添加到 ~/.bash_profile中。
<!-- lang: shell -->
source ~/.bashrc
转载于:https://my.oschina.net/yunyue/blog/108399