npm-global'打开或创建一个~/.profile文件并添加以下行:exportPATH=~/.npm-global/bin:$PATH回到命令行,更新系统变量:source~/.profile 测试:全局下载包