设置一个环境变量

echo -e “export PATH=$(npm prefix -g)/bin:$PATH >> ~/.bashrc && source ~/.bashrc