vim ~/.bashrc文件在最下面添加这段话即可实现打开终端自动执行2条命令
正常用户
echo “Hello,Qinghe Wang! Hurry up!”
cd /home/wangqinghe/codes
source activate wqh
以下是容器用户
__conda_setup="$('/home/wangqinghe/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/wangqinghe/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/wangqinghe/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/wangqinghe/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
conda activate base
cd /home/wangqinghe/codes/2021multi-teachers
<<< conda initialize <<<
conda activate base
cd /home/wangqinghe/codes/2021multi-teachers