Yang
Yang's Blog

Yang's Blog

Select Nodejs version by using nvm on Ubuntu

Yang's photo
Yang
·Jun 2, 2022·

1 min read

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
  source ~/.profile
  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 install node
  nvm install 16
  nvm use 16
  npm i -g yarn
 
Share this