How To Install NodeJs using NVM on Ubuntu

nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL. This post describes How To Install NodeJs using NVM on Ubuntu.

OPTIONAL. Windows 10 Users

To install ubunu 18.04 on Windows 10 WSL, follow instructions below:

How To Install WSL on Windows 10

STEP 1. Install & Update Script

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

source ~/.bashrc

STEP 2. Verify Installation

command -v nvm
> nvm

Step 3. Install NodeJs

To install the latest available version of Node.js, you can use the following command:

nvm install node

Install the latest Node.js LTS version

nvm install --lts
1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *