装了conda后终端变成了:
主要原因是装完conda之后,~/.bashrc
被自动修改了,即自动插入了以下内容:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/yusong/software/anaconda/yes/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/yusong/software/anaconda/yes/etc/profile.d/conda.sh" ]; then
. "/home/yusong/software/anaconda/yes/etc/profile.d/conda.sh"
else
export PATH="/home/yusong/software/anaconda/yes/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
所以,如果想要回复原始的终端提示,则需要在最后添加一行(sudo vim ~/.bashrc
):
# for color
export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
保存,然后刷新环境变量,执行:
source ~/.bashrc
效果如下:
xxx@xxx-desktop:~$ source ~/.bashrc