Fedora 29:不读取 .bash_profile 中的更改

Fedora 29:不读取 .bash_profile 中的更改


我已向 .bash_profile 添加了一些别名和函数,但当我启动新的命令行提示符时它们不可用。重新启动后它们都不可用。我每次都需要执行“source ~/.bash_profile”。因此,我在 .bashrc 文件中添加了以下内容:

if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
#Added source
source ~/.bash_profile

然而现在,当我尝试打开一个新的 shell 时,窗口只会弹出一秒钟,然后关闭。知道如何立即应用 .bash_profile 中的更改吗?谢谢

相关内容