Node Version Manager, also known as NVM is used to control and manage multiple active versions of Node.js in one system. It is a command line utility and a bash script that allows programmers to shift between different versions of Node.js. They will be able to install any version using a single command and setting defaults using the command line utility.
- These installation instructions are specifically for an Ubuntu 16.04 LTS server.
- I am using a Liquid Web Storm VPS Ubuntu 16.04 LTS 64-bit Core-managed server.
- I will be logged in as Root.
Step 1: Installing NVM (Node Version Manager) on Ubuntu 16.04 LTS
- Install a C++ Compiler
First, make sure all packages are up to date:
- The build-essential package (C++ Compiler) should exist on the server, however, we will still include it in our installation process:
apt-get install build-essential libss1-dev
Step 2: Install NVM (Node Version Manager)
- Using this curl command will start the installation script:
curl-o-https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
At the time of this publication, NVM v0.33.8 was the most recent version available. You should check the GitHub project page for the latest release of NVM, and adjust the above command to include the newest version.
- After running the curl command, the output should look similar to the following:
Close and reopen your terminal to start using nvm
- You can do as the above output suggests or run the following command:
Step 3: Verify the Installation
Now you can verify that NVM is installed and working properly using the following command:
The output will show: