以前一直以为gnome-terminal source的是~/.bashrc,今天设置alias时才发现~/.bashrc对gnome-terminal没有效果,一查才知道gnome-terminal是login的shell,source的是~/.bash_profile,所以只需要在~下 ln -s .bashrc .bash_profile就可以让gnome-terminal间接source ~/.bashrc了。
以前一直以为gnome-terminal source的是~/.bashrc,今天设置alias时才发现~/.bashrc对gnome-terminal没有效果,一查才知道gnome-terminal是login的shell,source的是~/.bash_profile,所以只需要在~下 ln -s .bashrc .bash_profile就可以让gnome-terminal间接source ~/.bashrc了。
哈哈,gnome-terminal的source确实是.bashrc
.bash_profile是登录x是执行的,如果没有这个文件则会执行.profile,.bash_logout是退出x时执行的文件……
通常我是在.bash_profile里. ~/.bashrc的,呵呵