1. 下载安装

curl  

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

wget

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash

 

2. source命令

针对找不到nvm指令

source ~/.bashrc

或者

source ~/.zshrc

 

3. 使用

查看已安装版本

nvm ls-remote

指定版本安装

nvm install v8.9.4

然后,指定使用的版本

nvm use v8.9.4

 

4. 其他指令

查看当前版本

nvm current

查看已安装

nvm ls

 

相关文章: