有时候修改了 .bashrc文件后,每次登录都得重新执行 source .bashrc 才行。
或者用其他软件类似 mobaXterm 通过 ssh 终端连接时,没有 ll 等命令,也要执行 source .bashrc 才可以。
解决方法:
C 代码
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
