Bash は手動で起動しない限り .bashrc を読みません。

Bash は手動で起動しない限り .bashrc を読みません。

bash端末で手動で実行しない限り、対話型端末からソースを取得しません.bashrcbash

$ bash

または手動でインポートしてください。

$ source ./.bashrc

または以下を実行してください。

$ st -e bash

これが有用な結果になることを願っています。

$ echo $TERM
st-256color

$ echo $SHELL
/bin/sh

$ readlink /bin/sh
bash

$ shopt login_shell
login_shell     off

私はCRUX Linux 3.0を使用していdwmますst。私は試してみましたが、成功しませんでした.bash_profile.profile

どんなアイデアがありますか?

ベストアンサー1

.bash_profileに次のものがあることを確認してください。

# .bash_profile

# If .bash_profile exists, bash doesn't read .profile
if [[ -f ~/.profile ]]; then
  . ~/.profile
fi

# If the shell is interactive and .bashrc exists, get the aliases and functions
if [[ $- == *i* && -f ~/.bashrc ]]; then
    . ~/.bashrc
fi

おすすめ記事