Home Linux Server Install Node.js on Ubuntu 20.04

Install Node.js on Ubuntu 20.04


In this article, AZDIGI will show you how to install Node.js on Ubuntu 20.04.

I. Introduction

Node.js is a JavaScript runner for server-side programming. It allows developers to create extensible backend functionality using JavaScript, a language many people are familiar with in browser-based web development.

II. Performance conditions

This tutorial is done on Ubuntu version 20.04. Before you begin, you should have a user account with sudo privileges set up on your system, or if not, you can use the root account.

III. Install Node.js on Ubuntu 20.04

To install Node.js on Ubuntu 20.04, we follow these 2 steps.

Step 1: SSH into your Ubuntu 20.04 system

To install Node.js on Ubuntu 20.04, we first need to SSH or access your VPS/server as root. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

After successfully SSH as root, we continue with step 2 to execute the Node.js installation commands.

Step 2: Commands to install Node.js on Ubuntu 20.04

First, you should update your Ubuntu with the following command:

AZDIGI Tutorial
apt update

After the update is complete, use the following command to install Node.js from the default Ubuntu repositories. At the time of writing, the version in the Ubuntu repositories is Node.js 10.19.

While this is not the latest version of Node.js, it is a stable version with all the features you need.

AZDIGI Tutorial
apt install nodejs 

After running the above command, you will get information about how much space to download and how much space it will take up after installation. You need to enter Y to continue the installation process.

Run the command to install Node.js on Ubuntu 20.04.

After the installation is complete, use the following command to check if you have successfully installed or not and, if it has been successfully installed, what version has been installed.

AZDIGI Tutorial
nodejs -v

Below is an image of my Node.js installation log on Ubuntu 20.04 and checking the Node.js version I just installed.

The installed Node.js version is v10.19.

If the package in the repository suits your needs, this is all you need to do to set up Node.js. However, in most cases, you’ll also want to install the Node.js package manager npm. You can do this by installing npm with the apt command below:

AZDIGI Tutorial
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

So AZDIGI has completed the steps to install Node.js on Ubuntu 20.04 server.

Wishing you success!

If you need assistance, you can contact support in the ways below:

Đánh giá

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign