Before we go into steps for, How to install Node js (v10+) and NPM on Ubuntu and Windows, let go briefly over Node.js usage facts in the revolutionary IT world. Everyone from your pals uses Node.js, either at any tech startup to a well-established business. The reason because it boosts developer productivity and accelerates the development process. Ok! Node.js apps help organizations run faster and more efficiently, but which companies use Node.js? Here are some facts
So, let's get started for the process of installing Node js (v10+) and NPM through different ways on Ubuntu's latest version
Step#1: This process of installation is relatively simple. Run the commands below to update the product directory and install Node.js and npm.
sudo apt update sudo apt install nodejs npm
Step#2: Once completed, Verify that Node.js and NPM get properly installed; by running this command, it will show the version of Node.js installed
Note: These instructions presume sudo gets installed; nevertheless, certain distributions, especially ones focused on a minimalist environment, may not contain sudo by default. In this instance, sudo or su to root should get installed to perform the instructions directly.
NodeSource provides an APT repository with different versions of Node.js. I'll walk you through the steps to install the most recent Node.js version 14.x
Step#1: Run the following command to download and execute the NodeSource installation script as a user with sudo permissions.
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Bonus Tip: If you require a different Node.js version, such as 13.x, replace setup 14.x with setup 13.x.
Step#2: Run the following command once the NodeSource repository with all required packages got activated
sudo apt install nodejs
Step#3: Now that you have both the node and npm binaries by executing this command, you can validate the installation using the instructions below to output the version.
node –version npm –version
It will show you the versions you selected for installation
You may utilize multiple node versions for different projects with this method
Step#1: Install the NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
Now is the time to use
If you obtain a version number like 0.35.3, you know nvm was installed correctly. To make your modifications take effect, restart your terminal.
Step#2: Use the following command to acquire a list of all Node.js versions that can get installed with nvm. It will produce a long list of all possible versions.
Step#3: To get the most recent version of Node.js, run the following command:
nvm install node
This command will install nodejs and the most recent version of npm.
Step#4: Verify it one again after installation by printing the Node.js version:
Now, you know how to install Node js (v10+) and NPM on Ubuntu and Windows; here is some general recommendation for you to keep in mind.
Installing Node.js on Windows is relatively straightforward; follow the steps below.
Step#1: The official Node.js website has a Windows Installer available for download. So, go to their official website or use the link below
Note: The Node.js package manager (npm) got included in the installation. It eliminates the need to install npm individually.
Step#2: Remember to choose the suitable version for your operating system. You can download two versions available on the website
For its simplicity, Node.js is simple to learn and use, yet it has incredible capabilities for developing sophisticated applications. It can also assist you in becoming a full-stack developer in a short period. There are several excellent choices for learning this fun and valuable skill at your speed. Even if you're unsure about anything, a large community of active users has formed to keep the new developers and their inquiries from falling through the gaps. It's time to start exploring now that you've learned how to install Node.js on Windows and Ubuntu.