How to Install Node.js and NPM on Ubuntu 18.04

To install Node.js and NPM on Ubuntu 18.04, you need to add Node.js PPA to your Ubuntu 18.04 LTS , 16.04 LTS, 14.04 LTS system and install it. The same steps can be applied to any Debian-based distribution, including Kubuntu, Linux Mint, and Elementary OS.

Node.js is open source technology and compatible with many platforms. Node.js is used by many developers to increase the functionality of web applications. The main benefit of Node.js is that it is a server-side implementation, allowing JavaScript to operate without a client.
 

Article Table of Contents:
I. Node.js and NPM instructions on Ubuntu 18.04.
   1. Add Node.js from NodeSource.
2. Install Node.js on Ubuntu. 3. Check version. II. Uninstallation instructions.
   
   

I. Node.js and NPM tutorial on Ubuntu 18.04, Linux

There are many ways to install Node.js. However, thuthuat.taimienphi.vn will guide you in the simplest and most effective way. You can download the latest version of Node.js via .rpm, .dep and Snap packages.
 

1. Add Node.js from NodeSource

This is the simplest method to install a specific version of Node.js. You can quickly follow the steps below to install Node.js versions 13.x, 12.x, and 10.x.

First, you add the Node.js PPA to your system to install Node.js on Ubuntu.
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -

If you need to install any other version, then change the version number, such as 12.x, 10.x.
 

2. Install Node.js on Ubuntu

How to Install Node.js and NPM on Ubuntu 18.04 Picture 1

Once the Node.js PPA has been activated, you install Node.js using the apt-get command. This will also install NPM with Node.js. At the same time, it will install many other dependent packages on your system.
sudo apt-get install -y nodejs
 

3. Check installed Node.js and NPM versions

Finally, Node.js and NPM have been successfully installed on the system. You can check and confirm the installed Node.js version using the following command:
node --version

Similarly, to check the NPM version, use the command:
npm --version
 

II. Instructions for uninstalling Node.js on Ubuntu

If you want to completely remove the Node.js and NPM packages from your system, just execute the following command:
sudo apt-get purge nodejs npm

Finally, run the command below to delete all unused files and free up storage space.
sudo apt-get autoremove


So, with just a few simple steps, you can successfully install Node.js and NPM on Ubuntu 18.04, and the article also provides you with an easy way to uninstall them if you don't need them. use. Please refer to How to install GIMP on Ubuntu 18.04 here to be able to use this photo editing software compared to Photoshop.

4 ★ | 1 Vote

May be interested

  • 5 things to do when installing Ubuntu on PC5 things to do when installing Ubuntu on PC
    ubuntu is a powerful linux distribution suitable for a wide variety of use cases, ideal for both beginners and seasoned linux users.
  • How to install µTorrent (uTorrent) in Ubuntu 20.04How to install µTorrent (uTorrent) in Ubuntu 20.04
    µtorrent provides clients for windows and macos x, however it is installed as a server in ubuntu linux and provides a web ui for managing downloads.
  • How to Install Ubuntu Linux Without CD (Windows)How to Install Ubuntu Linux Without CD (Windows)
    want to install ubuntu on your windows computer, but don't have a dvd or cd drive? there are a couple of different ways that you can install ubuntu on computers that don't have disc drives. the most common way is to create a bootable usb...
  • How to Install ClickHouse on Ubuntu 22.04How to Install ClickHouse on Ubuntu 22.04
    clickhouse is a modern, fast and open source database management system used for online analytical processing (olap).
  • How to install MySQL on Ubuntu 20.04How to install MySQL on Ubuntu 20.04
    in this article, tipsmake will show how to install mysql version 8.0 on ubuntu 20.04 server. by completing it, you'll have an active relational database that can be used to build your next website or app.
  • How to install AVG Antivirus on UbuntuHow to install AVG Antivirus on Ubuntu
    in addition to windows, you can install avg antivirus on ubuntu easily and quickly to ensure that damage is minimized in the most optimal way. along with tipsmake, see how to install avg antivirus on ubuntu below.
  • How to install Ubuntu on a VMware virtual machineHow to install Ubuntu on a VMware virtual machine
    how to install ubuntu on a vmware virtual machine. ubuntu is a very popular operating system nowadays parallel to windows and macos. but ubuntu still makes many users wonder before upgrading should use on their own computers, so we still have a way to experience ubuntu.
  • How to compress and decompress files in Node.jsHow to compress and decompress files in Node.js
    take advantage of the archiver and unzipper packages to compress and decompress files in node.js very easily. here are detailed instructions.
  • Ways to install Ubuntu on Windows, run in parallel or run separatelyWays to install Ubuntu on Windows, run in parallel or run separately
    there are many ways to install ubuntu on your computer, such as installing ubuntu from usb, cd, installing ubuntu running in parallel with windows, installing it
  • What's New in Ubuntu 21.10?What's New in Ubuntu 21.10?
    version 21.10 is the latest release of ubuntu and although canonical is turning more attention to the cloud and developers, ubuntu 'impish indri' still comes with some notable changes for those users use the ubuntu desktop every day.