apt install nvm code example
Example 1: install nodejs latest version ubuntu
sudo apt update && sudo apt install curl -y
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt install nodejs
nodejs -v
v15.3.0
Example 2: linux install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Example 3: how to install nvm in ubuntu
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash# Alternatively $ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash