Instructions for installing Node.js with NVM on Ubuntu 22.04 with 2 steps
NVM is an acronym for Node.js Version Manageris a flexible tool for installing and managing multiple versions of Node.js and related packages at the same time.
Xem Thêm : Build a News Website with MyThemeShop
In this tutorial, we will learn how to install a specific version of Node.js through NVM, please see the installation section below.
Step 1: Install NVM
To install or update NVM, you can use the curl command to download and execute the file. You can download the latest version from nvm official repository
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
- Run the install command
- Check if NVM has been installed successfully, please use the command below
- Check if NVM has been installed successfully, use the command below
Step 2: Install Node.js
- Once you have installed NVM, you can list all the Node.js versions available through NVM using ls-remote with the command:
- After running the above command, a very long list of Node.js versions will be displayed. You can install any of the versions shown here.
For example if you want to install Node.js . version 16.15.0you just need to use the command install as follows :
- Check the results after installation
Above is the installation guide Node.js through NVM in the most detail, with NVM you can easily manage and install different versions of Node.js in a very simple way. Wishing you success.
You can refer to other user guides at the link below:
If you need assistance, you can contact support in the ways below: