本文共 717 字,大约阅读时间需要 2 分钟。
After add user in Ubuntu, there is no ~/.bashrc under user home for me to setup my own user $PATH.
1. man bash
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.
2.
#touch ~/.bash_profile
#vim ~/.bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
3.
#touch ~/.bashrc
#vim ~/.bashrc
export PATH=$PATH:....
转载地址:http://jemvi.baihongyu.com/