Learn Code With Durgesh LogoLCWD
HomeCoursesBlogsContact Us
HomeCoursesBlogsContact Us
LearnCodeWithDurgesh Logo

Learn Code With Durgesh

Offering free & premium coding courses to lakhs of students via YouTube and our platform.

Explore

  • About Us
  • Courses
  • Blog
  • Contact

Legal

  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Support

Contact

  • 📞 +91-9839466732
  • support@learncodewithdurgesh.com
  • Substring Technologies, 633/D/P256 B R Dubey Enclave Dhanwa Deva Road Matiyari Chinhat, Lucknow, UP, INDIA 226028
© 2025 Made with ❤️ by Substring Technologies. All rights reserved.
Installing Node on ubuntu Using the Node Version Manager

Installing Node on ubuntu Using the Node Version Manager

By durgesh • Tue Oct 04 2022

Installing Node on ubuntu Using the Node Version Manager

image

Using Node Js we can run javascript from outside browser. With the help of node js we can create backend application using javascript.

In this article i am going to show you how to download and install node js in ubuntu machine step by step.

There are different ways to install node js on ubuntu machine. The simplest way to install using command 

apt install nodejs

but the disadvange of this command is it install old version of node js. so to install latest version we are going to use nvm step by step.

Prerequisites

This guide assumes that you are using Ubuntu 20.04. Before you begin, you should have a non-root user account with sudo privileges set up on your system.

Installing Node Using the Node Version Manager

To install NVM on your Ubuntu 20.04 machine, visit the project’s GitHub page. Copy the curl command from the README file that displays on the main page. This will get you the most recent version of the installation script.

Before piping the command through to bash, it is always a good idea to audit the script to make sure it isn’t doing anything you don’t agree with. You can do that by removing the | bash segment at the end of the curl command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh

Take a look and make sure you are comfortable with the changes it is making. When you are satisfied, run the command again with | bash appended at the end. The URL you use will change depending on the latest version of nvm, but as of right now, the script can be downloaded and executed by typing:

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

This will install the nvm script to your user account. To use it, you must first source your .bashrc file:

source ~/.bashrc

Now, you can ask NVM which versions of Node are available:

nvm list-remote
Output
. . .
       v14.16.0   (LTS: Fermium)
       v14.16.1   (LTS: Fermium)
       v14.17.0   (LTS: Fermium)
       v14.17.1   (LTS: Fermium)
       v14.17.2   (LTS: Fermium)
       v14.17.3   (LTS: Fermium)
       v14.17.4   (Latest LTS: Fermium)
        v15.0.0
        v15.0.1
        v15.1.0
        v15.2.0
        v15.2.1
        v15.3.0
        v15.4.0
        v15.5.0
        v15.5.1
        v15.6.0
        v15.7.0
        v15.8.0
        v15.9.0
       v15.10.0
       v15.11.0
       v15.12.0
       v15.13.0
       v15.14.0
        v16.0.0
        v16.1.0
        v16.2.0

Install by typing the version

nvm install v16.0.2

We can also use different version as well

nvm list
nvm install v16.0.0

switch the version

nvm use v16.0.0

I hope this guide helps you.

 

 

Share this article ...

💬WhatsApp📘Facebook💼LinkedIn🐦X

Trending Blogs...

Maven Tutorial

Maven Tutorial

Maven is a build automation tool primarily used for Java projects. It addresses two main aspects of building software: dependency management and project build lifecycle management.

Important DSA Topics for placements

Important DSA Topics for placements

Data Structures and Algorithms (DSA) are fundamental building blocks of computer science. A strong understanding of DSA is essential for every developer, regardless of their specialization.

Amazing Windows key shortcuts in Windows 11

Amazing Windows key shortcuts in Windows 11

Shortcuts are everyone’s favorite, be it in life or in Keyboard. We don’t know about life but we have some amazing shortcut tricks for your keyboard, which are newly introduced in windows 11. Let's have a look and understand these amazing shortcuts to reduce our finger pain

Share this article ...

💬WhatsApp📘Facebook💼LinkedIn🐦X