Skip to content

Instantly share code, notes, and snippets.

@MatiasPujado
Created December 25, 2022 17:44
Show Gist options
  • Save MatiasPujado/34cc31d040e53c39ed4e169e4abb51f4 to your computer and use it in GitHub Desktop.
Save MatiasPujado/34cc31d040e53c39ed4e169e4abb51f4 to your computer and use it in GitHub Desktop.
NVM list of commands
// Install a specific version number
nvm install 8.0.0
// Install the latest LTS version
nvm install --lts
// Use the latest available 8.0.x release
nvm use 8.0
// Use the latest LTS version
nvm use --lts
// Run app.js using node 6.10.3
nvm run 6.10.3 app.js
// Run node app.js with the PATH pointing to node 4.8.3
nvm exec 4.8.3 node app.js
// Set default node version on a shell
nvm alias default 8.1.0
// Always default to the latest available node version on a shell
nvm alias default node
// Install the latest available version
nvm install node
// Use the latest version
nvm use node
// Set text colors to cyan, green, bold yellow, magenta, and white
nvm set-colors cgYmW
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// set default version of node
nvm alias default 6.9.2
// to list available remote versions of node (via nvm)
nvm ls-remote
nvm ls-remote | grep -i 'latest'
or all versions starting with v18
nvm ls-remote | grep -i 'v18'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment