Skip to content

Instantly share code, notes, and snippets.

@marcusholloway17
Created March 24, 2024 09:03
Show Gist options
  • Select an option

  • Save marcusholloway17/ef098e7a871b4f1e6d5ddef183f5260b to your computer and use it in GitHub Desktop.

Select an option

Save marcusholloway17/ef098e7a871b4f1e6d5ddef183f5260b to your computer and use it in GitHub Desktop.
How To Install NVM on Ubuntu 22.04

Prerequisites

  • You must have a running Ubuntu 22.04 Linux system with shell access.
  • Log in with a user account to which you need to install node.js.

Step 1: Installing NVM on Ubuntu

sudo apt install curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

The nvm installer script creates an environment entry to the login script of the current user. You can either log out and log in again to load the environment or execute the below command to do the same.

source ~/.profile

Step 2: Installing Node using NVM

  • Install the latest version of node.js. Here node is the alias for the latest version.
nvm install node
  • To install a specific version of node: For example 18.16.1
nvm install 18.16.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment