由于不熟悉添加永久路径的方式,一不小心导出了错误的目录,即 /home/adolph/anaconda3/condabin。(应该是/home/adolph/anaconda3/bin)
adolph@adolph-System-Product-Name:~$ echo $PATH
/home/adolph/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/adolph/anaconda3/bin:/home/adolph/anaconda3/bin
我试图在大多数帖子介绍的方法中删除错误的目录。 参考 1参考2
adolph@adolph-System-Product-Name:~$ PATH=$(echo "$PATH" | sed -e 's/:\/home\/adolph\/anaconda3\/condabin$//')
但是,它仍然存在。如何有效解决?
adolph@adolph-System-Product-Name:~$ echo $PATH
/home/adolph/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/adolph/anaconda3/bin:/home/adolph/anaconda3/bin