小编v78*_*v78的帖子

'source .bash_profile' 失败,但 'source path/to/.bash_profile' 有效

我正在尝试在 sudo-less 用户中的远程主机上获取我的 .bashrc 文件。我收到以下回复。

sh-4.2$ source .bash_profile
sh-4.2$ source: .bash_profile: file not found

sh-4.2$ source ~/.bash_profile
[user@hera ~]$
Run Code Online (Sandbox Code Playgroud)

为什么会出现这种行为?

添加图像

.bash_profile 的内容

.bashrc 的内容

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

# added by Anaconda3 4.1.1 installer
export PATH="/home/tensorflow/anaconda3/bin:$PATH"
Run Code Online (Sandbox Code Playgroud)

linux ssh bash bashrc

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

标签 统计

bash ×1

bashrc ×1

linux ×1

ssh ×1