系统配置
- Ubuntu 20.04
通过conda自动修复启动脚本
问题:ssh连接后,执行conda指令,提示没有该指令
- 进入conda根目录下的bin目录后,执行以下指令
./conda init
- 执行完后,令.bashrc文件生效
source ~/.bashrc
如果远程登陆仍没有生效请看下一节
配置profile文件
- 编辑当前用户根目录下的.profile文件
vim ~/.profile
- 如果.profile为空,在.profile添加以下内容
# 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
- 然后source一下生效
source ~/.profile
下次ssh登陆就会在用户名前面显示当前conda虚拟环境(base)