

=> Close and reopen your terminal to start using nvm or run the following to use it now:

=> Appending bash_completion source string to /root/.bashrc The script will clone the project’s repository from Github to the ~/.nvm directory: => Appending nvm source string to /root/.bashrc NVM is also known as “Node Version Manager” is a script that allows you to manage multiple versions of Node.js. Now you can verify Node.js and NPM Version with this command: node -vĪlso see: Install Apache on Ubuntu 20.04 LTS Option 3: Installing Node.js and NPM using NVM Run the next command as a person with sudo privileges to obtain and execute the NodeSource set up script: curl -sL | sudo -E bash -Īs soon as the NodeSource repository is enabled, set up Node.js and npm: sudo apt install nodejs It maintains an APT repository containing multiple Node.js versions.Īt the time of writing, the NodeSource repository provides the following versions: To install a different version of Node.js, you can use a PPA (personal package archive) maintained by NodeSource. NodeSource is a company focused on providing enterprise-grade Node support. Option 2: Installing Node.js with Apt Using a NodeSource PPA This will allow you to install modules and packages to use with Node.js.Īt this point, you have successfully installed Node.js and npm using apt and the default Ubuntu software repositories. You can do this by installing the npm package with apt: sudo apt install npm In most cases, you’ll also want to also install npm, the Node.js package manager. See also How to get ckeditor value with tags on ajax-submit ? Once installed, check the node.js version: node -v The recommended way to install Node.js on your Ubuntu 20.04 LTS is by using the apt command to install the stable default Node.js version from the standard Ubuntu Repository: sudo apt install nodejs Option 1: Installing Node.js with Apt from the Default Repositories

It’s a free and open-source cross-platform solution that’s primarily for server-side programming. Node.js is a powerful JavaScript runtime.
