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- | 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

Comments are closed.