DEV Community

Cover image for The Easiest Way to Install Node.js on WSL, Mac & Ubuntu
Dom (dcode)
Dom (dcode)

Posted on

The Easiest Way to Install Node.js on WSL, Mac & Ubuntu

Let's have a look at the easiest way to install Node.js on your WSL, Mac, or Ubuntu system.

We're going to be using a tool called nvm.

Video Tutorial

If you prefer, you can watch my 4-minute video on installing Node.js instead:

How to Install Node.js on Your WSL, Mac or Ubuntu System

  1. Go to the GitHub page for nvm.
  2. Copy and paste the install script into your command line. At the time of writing, 0.39.3 is the latest version:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
    
  3. Hit Enter. Once installation is complete, close and re-open your terminal window.

  4. Now that nvm is installed, you can install the latest version of Node.js by typing:

    nvm install node
    
  5. That's it! You should now be able to type node --version and see that the latest version is installed.

Happy coding 😎

Enrol Now 👉 JavaScript DOM Crash Course

You can find a complete course on the JavaScript DOM using the link below 👇

https://www.udemy.com/course/the-ultimate-javascript-dom-crash-course/?referralCode=DC343E5C8ED163F337E1

Course Thumbnail

Top comments (0)