In this article, I will show you how to install Node.js on Ubuntu 20.04.
I. Introduction
Node.js is a JavaScript launcher for server-side programming. It allows developers to create extensible backend functionality using JavaScript, a language many people are familiar with for browser-based web development.
II. Performance conditions
This guide simulates that you are using Ubuntu version 20.04. Before you begin, you should have a user account with sudo privileges set up on your system, or if not then you can also use the root account.
III. Install Node.js on Ubuntu 20.04
To install Node.js on Ubuntu 20.04 we need to do the following 2 steps.
Step 1: SSH into your Ubuntu 20.04 system
To install Node.js on Ubuntu 20.04, we first need SSH or access your VPS or server with root privileges first. If you do not know how to SSH to your VPS or Server, you can refer to the following tutorial:
Step 2: Install Node.js commands on Ubuntu 20.04
First, you should update your Ubuntu with the following command first.
apt update
After the update is complete, use the following command to install Node.js from Ubuntu’s default repositories. At the time of writing, the repository version of Ubuntu is Node.js 10.19.
While this is not the latest version of Node.js, it is the stable version with all the features you need.
apt install jodejs
After running the above command, you will receive information about how much space will download as well as how much space will be occupied after the installation. You will need to fill it in in Y to continue with the installation process.
After the installation is complete, use the following command to check if you have successfully installed and if it has been installed successfully, which version is installed.
nodejs -v
Below is a picture of the Node.js installation log on my Ubuntu 20.04 as well as checking the Node.js version I just installed.
f the repository package suits your needs, here’s all you need to do to set up Node.js. In most cases, you will also want to install npm the Node.js package manager. You can do this by installing npm with the apt command below:
apt install npm
This will allow you to install modules and packages for use with Node.js.
At this point, you have successfully installed Node.js on your Ubuntu 20.04 server.
IV. Summary:
As you can see, installing Node.js on Ubuntu 20.04 server is super simple and fast, isn’t it?
I wish you a successful implementation. See more useful articles about VPS Linux at the Tutorials.