
If NodeJS was installed using aptpackage manager in Ubuntu, it can be updated as well using the same. It is also recommended that nvm (Node Version Manager) must be installed on your machine, so that we can update NodeJS efficiently. NodeJS must be already installed on your Ubuntu machine. In this tutorial, we will see how to update Node JS in Ubuntu. Its package manager, npm is one of the biggest repositories for Javascript libraries. It has been widely accepted in the world of web development and is commonly used for developing lightweight backend servers, REST APIs, etc.

If you want the latest/current version period (whether it's an LTS or not): curl -fsSL įinally, you can confirm that everything worked with: node -v ConclusionĪs you can see, it's easy to install a specific version of Node.js once you know where to find its source.NodeJS is one of the most popular Javascript frameworks nowadays. If you want the latest LTS, you can use: curl -fsSL

If you want to verify/see a list of available sources, you can do so here. In the above example, I'm after v16.x, but all versions match the same pattern. Install Node with the following commands: Node LTS versions are evenly numbered (v14, v16, etc.) If you don't know, go with the latest LTS. Stay with the herd! How to Install a Specific Node Version in Ubuntu Linuxįigure out which Node.js version you want. If you run into issues and you're using the same Node version as everyone else, it's easier for you to get help. Like a gazelle being chased by a lion, there's safety in numbers. As a result, testing is performed against that specific Node version and you're less likely to introduce new issues by offroading with a different version. If you're running a version of Node.js that's been specifically called out by an application's developers, you can be sure that those same developers are using it too. In a lot of cases, you can avoid headache simply by making sure the Node.js version you're using is supported by the Node application you're trying to run.

This is because your Node application can have several Node-version-specific binary dependencies. When doing Node development, or indeed just running a Node application, a specific Node.js version may be required. Why is a Specific Node Version Necessary? (Don't think of installing a specific version as installing an "older" version, think of it as installing a "long-term support" (LTS) version!) Here is how to install a specific Node version in Ubuntu Linux. Sometimes you need to use a specific version of Node, even if that version may be "older".
