Install and Manage Node.js with NVM
Installation Steps
Download and run the installation file:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
Exit the terminal session then reopen a terminal so that the environment changes take effect. Then run:
nvm -v
to ensure NVM is installed correctly.
Using NVM
Install the latest Node version with:
nvm install node
Install a specific version with:
nvm install 16
or for a more specific version:
nvm install 14.4.5
List the installed versions with:
nvm ls
Switch to an installed version with: