# For Ubuntu distribution
foo@bar: curl -fsSL http://deb.nodesource.com/setup_lts.x | sudo -E bash -
foo@bar: sudo apt-get install -y nodejs# For Ubuntu distribution
foo@bar: curl -fsSL http://deb.nodesource.com/current_lts.x | sudo -E bash -
foo@bar: sudo apt-get install -y nodejsWith nvm we can to manage several node versions.
To install:
foo@bar: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
# Or
foo@bar: wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bashUsage:
# Check installation
foo@bar: nvm -v
# List local version
foo@bar: nvm ls
# List all available versions
foo@bar: nvm ls-remote
# Install node current
foo@bar: nvm install node
# Install any version node
foo@bar: nvm install 14.7.0 # or 10.10.9, 8.9.1
# Switch version after install
foo@bar: nvm use node #current
foo@bar: nvm use 14.7.0