小编rig*_*gyt的帖子

.bashrc 未加载,.bash_profile 存在

在 ubuntu 终端中,直到运行以下命令后,我的 .bashrc 才可用: source ~/.bashrc

我有一个 ~/.bash_profile ,内容如下:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Run Code Online (Sandbox Code Playgroud)

我有一个 ~/.profile :

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi
Run Code Online (Sandbox Code Playgroud)

我应该怎么做才能自动加载我的 .bashrc?我应该合并 .bash_profile 和 .profile 并删除其中之一吗?谢谢

ubuntu bashrc rvm

0
推荐指数
1
解决办法
4194
查看次数

标签 统计

bashrc ×1

rvm ×1

ubuntu ×1