linux系统 node版本管理

2020-01-18  本文已影响0人  squidbrother
概述

交互式地管理您的Node.js版本
有则切换,没有则下载
注:在Windows系统不支持n

安装

npm install n -g

指令
指令名 含义
n Display downloaded node versions and install selection
n latest Install the latest node release (downloading if necessary)
n lts Install the latest LTS node release (downloading if necessary)
n <version> Install node <version> (downloading if necessary)
n run <version> [args ...] Execute downloaded node <version> with [args ...]
n which <version> Output path for downloaded node <version>
n exec <vers> <cmd> [args...] Execute command with modified PATH, so downloaded node <version> and npm first
n rm <version ...> Remove the given downloaded version(s)
n prune Remove all downloaded versions except the installed version
n --latest Output the latest node version available
n --lts Output the latest LTS node version available
n ls Output downloaded versions
n ls-remote [version] Output matching versions available for download
n uninstall Remove the installed node and npm

【注】:
安装完毕后,需要重启linux服务器,即可看到nodejs版本变化

上一篇 下一篇

猜你喜欢

热点阅读