如何在Linux上安装nvm
下载nvm的最新版本
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
安装nvm
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
使用nvm安装node
nvm install node # "node" is an alias for the latest stable version nvm install --lts # "lts/*" is an alias for the latest LTS version nvm use node # use the latest stable version of node
查看所有可用的node版本
nvm ls-remote