Node Version Manager (NVM) is a tool that will allow you to download and install multiple versions of Node.js, one of the environments for the JavaScript programming language that we teach at Flatiron School. Installing NVM is the first step in installing Node.js on your Ubuntu operating system.
- Open the "Ubuntu" application using the "Start" menu
- Type
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
and press<Enter>
- Close the "Ubuntu" application
- Reopen the "Ubuntu" application
- Type
nvm
and press<Enter>
If you see a message ending with "Note: to remove, delete, or uninstall nvm", continue below.
Note: If
nvm
is not recognized, or you are seeing new errors when restarting the "Ubuntu" application, check out the troubleshooting steps in the Verify and Troubleshoot your WSL2 Environment Setup lesson later on in this module.
For our JavaScript labs and lessons, we expect that students use Node.js on Ubuntu. If Node Version Manager (NVM) has been successfully installed, you can quickly install Node.js with a couple of commands.
- Open the "Ubuntu" application using the "Start" menu
- Type
nvm install --lts
and press<Enter>
- Type
nvm list
and press<Enter>
If you see a message starting with "-> v16.0.0" (or any higher number, like "-> 16.11.1"), continue to the next lesson, Windows WSL2 Python Installation.