Skip to content

Instantly share code, notes, and snippets.

@selvan
Created February 8, 2021 07:40
Show Gist options
  • Save selvan/6233bbfbf52c13d75d816326e8453698 to your computer and use it in GitHub Desktop.
Save selvan/6233bbfbf52c13d75d816326e8453698 to your computer and use it in GitHub Desktop.
Installing, Configuring and Using NVM

Install:

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

Configuration: add below to .bashrc .bash_profile

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

Using:

nvm alias default system # Set existing node installed in the system as default
nvm install --lts # install latest LTS version node
nvm use --lts # Use LTS version of node only for the current session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment