'source .bash_profile' 不起作用但是 'source path / to / .bash_profile' 在职的
我正在尝试创建自己的文件 .bashrc 在用户内的远程主机上 sudo-less. 我得到了以下答案。
为什么这是行为?
https://i.stack.imgur.com/vO0yq.png
https://i.stack.imgur.com/58q1m.png
内容 .bashrc
sh-4.2$ source .bash_profile
sh-4.2$ source: .bash_profile: file not found
sh-4.2$ source ~/.bash_profile
[user@hera ~]$
为什么这是行为?
https://i.stack.imgur.com/vO0yq.png
https://i.stack.imgur.com/58q1m.png
内容 .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"
没有找到相关结果
已邀请:
2 个回复
卫东
赞同来自:
的
在下面
如果文件名不包含斜角,则文件名 PATH 用于搜索包含文件名的目录 ... 什么时候 bash 不是在模式中 posix, 如果在当前目录中执行搜索 PATH 提交文件。
Bash 在模式下工作 posix, 因为你推出它
比较可能
(所以命令行
). 您需要更改shell
使用这种“bashmet”。
郭文康
赞同来自: