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.
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.
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.
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
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
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.