Logo

How To Install NVM on Ubuntu 23.04

Dec 01, 2023

To install NVM on Ubuntu 23.04, follow these steps:

Step 1 : Update your system.

sudo apt update

Step 2 : Install the required packages.

sudo apt install build-essential libssl-dev curl

Step 3 : Download and run the NVM installation script.

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

This command downloads and runs the NVM installation script, adjusting the version number as needed.

Step 4 : Run the environment variables script.

source ~/.bashrc

This ensures that the changes to your environment variables are applied.

Step 5 : Verify the installation.

nvm --version

This command should display the installed version of NVM.

Step 6 : Basic NVM usage:

- Install a specific Node.js version:

nvm install <version_number>

- Use a specific Node.js version:

nvm use <version_number>

- Set a default Node.js version:

nvm alias default <version_number>

- Check the installed Node.js version:

node -v

- List all installed Node.js versions:

nvm list

Congratulations! You have successfully installed NVM on your Ubuntu 23.04 system, allowing you to easily manage multiple Node.js versions for your development needs.

Recommended