install nodejs ubuntu 19.04

To install Node.js on Ubuntu 19.04, follow these steps:

Step 1: Open the terminal.

Step 2: Update the package lists for upgrades and new package installations by running the following command:

sudo apt update

Step 3: Install Node.js using the NodeSource repository. First, install the required dependencies by running the following command:

sudo apt install curl software-properties-common

Step 4: Add the NodeSource repository by using the curl command:

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

Note: In this example, we are using Node.js version 14.x. You can change the version number according to your preference.

Step 5: Install Node.js by running the following command:

sudo apt install nodejs

Step 6: Verify the installation by checking the installed version of Node.js and npm (Node Package Manager) by running the following commands:

node -v

npm -v

You should see the version numbers of Node.js and npm displayed in the terminal if the installation was successful.

That's it! You have successfully installed Node.js on Ubuntu 19.04. You can now start using Node.js for your development projects.