Re: [問題] ubuntu8.04終端機好像預期不去讀.bash_ …

看板Linux作者 (So Say We All.)時間17年前 (2008/11/25 17:04), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《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

11/28 01:59, , 1F
喔~~ 又增廣見聞了~~ 多謝~~
11/28 01:59, 1F
文章代碼(AID): #19Ax-IPP (Linux)
文章代碼(AID): #19Ax-IPP (Linux)