【NodeJs】NVM的安装与使用?
程序员文章站
2022-06-30 15:00:47
...
NVM 安装
Install & Update Script
To install or update nvm, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
Running either of the above commands downloads a script and runs it. The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
NVM 一些使用命令
nvm install 8.0.0 Install a specific version number
nvm use 8.0 Use the latest available 8.0.x release
nvm run 6.10.3 app.js Run app.js using node 6.10.3
nvm exec 4.8.3 node app.js Run `node app.js` with the PATH pointing to node 4.8.3
nvm alias default 8.1.0 Set default node version on a shell
nvm alias default node Always default to the latest available node version
nvm ls # 列出当前的版本
nvm ls-remote # 列出线上可用的版本
上一篇: 卖衣服的卖衣服的
下一篇: 手机内存卡会影响读取速度?还是厂商的忽悠
推荐阅读
-
详解OkSocket与Android的简单使用
-
vue3.0 CLI - 1 - npm 安装与初始化的入门教程
-
windows系统中Python多版本与jupyter notebook使用虚拟环境的过程
-
Windows和Linux中php代码调试工具Xdebug的安装与配置详解
-
Linux中curl命令和wget命令的使用介绍与比较
-
关于Mac下安装nodejs、npm和cnpm的教程
-
[sonarqube的使用] sonarqube安装
-
浅谈Windows平台上Docker安装与使用
-
Linux系统下安装jdbc与tomcat的图文教程
-
电脑没安装游戏使用Excel时如何将隐藏的赛车游戏调出来