How to Install Node.js on Ubuntu 18.04 Bionic Beaver

Install Node.js on Ubuntu 18.04 Bionic Beaver

In this article, we will have explained the necessary steps to install and configure Node.js on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Node.js is an open source cross-platform JavaScript run-time environment that allows server-side execution of JavaScript code which simply means that you can run JavaScript code on your machine as a standalone application, free of any web browser.

Node.js is mainly used to build back-end server-side applications, but it is also very popular as a full-stack and front-end solution. Npm is the default package manager for Node.js and the world’s largest software registry.

Install Node.js on Ubuntu 18.04 Bionic Beaver

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install Node.js with npm on Ubuntu.

  • Install Node.js and npm using Ubuntu repository.

Confirm the installation of Node.js by typing:

Install npm by running following command:

Confirm the installation of npm by typing:

  • Install Node.js and npm using nvm.

Check nvm version and confirm installation typing;

Now install Node.js by using the following command;

Verify Node.js installation by typing;

  • Install Node.js from NodeSource Repository.

Now install Node.js and npm package typing.

Verify installtion of Node.js and npm running following command

That’s all you need to do to install Node.js on Ubuntu 18.04. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.