→ dogtsing:喔~~ 又增廣見聞了~~ 多謝~~ 11/28 01:59
※ 引述《WalkingIce ( 殺手哥吉拉 13)》之銘言:
: man bash 的時候可以看到這麼一段
: -l Make bash act as if it had been invoked as a
: login shell(see INVOCATION below).
: 這說明了為什麼 -l 的選項就會去讀 ~/.bash_profile
記得bash是在login時讀取 .bash_profile 接著讀 .bashrc
但接下來開的child shell只讀 .bashrc
: 問題二的解法,就是在 ~/.bashrc 或 /etc/bash.bashrc 裏面讓它去讀
: .bash_profile 就可以了。
: 但這並不是好的解法。
其實fedora預設的 .bash_profile 底有一段:
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
--
http://cardassian.blogspot.com/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.102.157