问题描述
我在this tutorial之后在WSL上安装了zsh和oh-my-zsh。它们都可以正常工作,但似乎我以前的安装无效,例如npm
。
还有什么需要做的吗?
解决方法
与Adding a new entry to the PATH variable in ZSH重复
将此行添加到.zshrc:
export PATH=$PATH
(如果尚未在$ PATH中添加npm的路径。)
source ~/.zshrc
或执行以下任一操作:
echo -n 'export PATH=~/bin:$PATH' >> ~/.zshrc
echo -n 'export PATH=$HOME/bin:$PATH' >> ~/.zshrc