How to Install Node.js on Ubuntu 20.04 and 20.10 (2024)

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Latest version node.js ppa is maintaining by its official website. We can add this PPA to your Ubuntu 20.04 LTS and 20.10 systems and install node.js on Linux VPS with easy commands.

Node.js is an open-source and cross-platform JavaScript runtime environment. It is a popular tool for almost any kind of project!

Prerequisites

This guide assumes that you are using Ubuntu 20.04 or 20.10. Before you begin, you should have a non-root user account with sudo privileges set up on your system.

  • root privileges
  • 2 GB or more of Ram
  • 2 CPUs or more
  • Certain ports are open on your machines.

Goals

This guidebook will walk you through How to Install Node.js on Ubuntu 20.04 and 20.10.

  • Install and configure Node.js on Ubuntu 20.04 and 20.10

So, let's start the installation

Step 1 – Add Node.js PPA

Node.js package is available in the LTS release and the current release. It’s your choice to select which version you want to install on the system as per your requirements. Let’s add the PPA to your system to install Nodejs on Ubuntu.

Use Current Release – During the last update of this tutorial, Node.js 14.15.1 is the current Node.js release available. Click Here!

#

sudo apt-get install curl

#

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

Use LTS Release – Instead of current release, its good idea to use stable version. During the last update of this tutorial, Node.js 12.x LTS release available.

#

sudo apt-get install curl

#

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

For this tutorial, I am using the latest current release and added their PPA to my system.

Step 2 – Install Node.js on Ubuntu

You can successfully add Node.js PPA to the Ubuntu system. Now execute the below command install Node on and Ubuntu using apt-get. This will also install NPM with node.js. This command also installs many other dependent packages on your system.

#

sudo apt-get install nodejs

Step 3 – Check Node.js and NPM Version

After installing node.js verify and check the installed version. You can find more details about current version on node.js official website.

#

node -v

v14.8.0

Also, check the npm version

#

npm -v

6.14.4

Step 4 – Create Demo Web Server (Optional)

This is an optional step. If you want to test your node.js install. Let’s create a web server with “Hello World!” text. Create a file server.js

#

vim server.js

and add the following content

server.js

var http = require('http');http.createServer(function (req, res) {res.writeHead(200, {'Content-Type': 'text/plain'});res.end('Hello World\n');}).listen(3000, "127.0.0.1");console.log('Server running at http://127.0.0.1:3000/');

Step 5 – Start the Node Application

Now start the Node application using the command.

#

node server.js

debugger listening on port 5858Server running at http://your_server_ip:3000

Step 6 – Debugging on Node.js

You can also start the application with debugging enabled with the following commands.

#

node --inspect server.js

Debugger listening on ws://your_server_ip:9229/984cf97g-29s6-4672-922d-a22479ce4e80For help, see: https://nodejs.org/en/docs/inspectorServer running at http://your_server_ip:3000

The web server has been started on port 3000. Now access http://your_server_ip:3000 URL in browser. Now you will need to configure a front-end server for your app.

Conclusion

This tutorial showed all the steps on how to install your Node.js on Ubuntu 20.10 in very simple and objective commands.

There are a few ways to start using Node.js on your Ubuntu server. While using the version packaged in the Ubuntu repository is the easiest method, using nvm or a NodeSource PPA offers additional flexibility.

How to Install Node.js on Ubuntu 20.04 and 20.10 (2024)
Top Articles
Is blood blue?
SeasonalTrading
How To Start a Consignment Shop in 12 Steps (2024) - Shopify
Katie Pavlich Bikini Photos
What Are Romance Scams and How to Avoid Them
Regal Amc Near Me
Myexperience Login Northwell
1970 Chevrolet Chevelle SS - Skyway Classics
Phone Number For Walmart Automotive Department
Collision Masters Fairbanks
Kansas Craigslist Free Stuff
Konkurrenz für Kioske: 7-Eleven will Minisupermärkte in Deutschland etablieren
Gw2 Legendary Amulet
Kostenlose Games: Die besten Free to play Spiele 2024 - Update mit einem legendären Shooter
Lesson 3 Homework Practice Measures Of Variation Answer Key
How Quickly Do I Lose My Bike Fitness?
4Chan Louisville
What to do if your rotary tiller won't start – Oleomac
Accuradio Unblocked
Midlife Crisis F95Zone
Cashtapp Atm Near Me
Espn Horse Racing Results
Best Forensic Pathology Careers + Salary Outlook | HealthGrad
Milspec Mojo Bio
Nine Perfect Strangers (Miniserie, 2021)
10 Fun Things to Do in Elk Grove, CA | Explore Elk Grove
A Cup of Cozy – Podcast
Obituaries Milwaukee Journal Sentinel
Lines Ac And Rs Can Best Be Described As
Bay Area Craigslist Cars For Sale By Owner
Feathers
2023 Ford Bronco Raptor for sale - Dallas, TX - craigslist
Yayo - RimWorld Wiki
Miller Plonka Obituaries
Maths Open Ref
Redding Activity Partners
What are the 7 Types of Communication with Examples
Busted! 29 New Arrests in Portsmouth, Ohio – 03/27/22 Scioto County Mugshots
Japanese Pokémon Cards vs English Pokémon Cards
Golden Tickets
Kelsey Mcewen Photos
Family Fare Ad Allendale Mi
House Of Budz Michigan
Hannibal Mo Craigslist Pets
Kelly Ripa Necklace 2022
Trivago Myrtle Beach Hotels
Überblick zum Barotrauma - Überblick zum Barotrauma - MSD Manual Profi-Ausgabe
Publictributes
Gotrax Scooter Error Code E2
Rescare Training Online
March 2023 Wincalendar
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 5973

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.