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
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.
You should read it
May be interested
- Backup Opera browser settings on Linuxthere are many ways to backup opera browser settings on linux. in the article below tipsmake will guide you through 2 ways to back up opera browser settings on linux via terminal and tar command.
- How to install LibreOffice on Ubuntu, Linux Mintalthough libreoffice is not as popular as office, it is cheaper and works very well on ubuntu, so in addition to office, we can install libreoffice on ubuntu and use it to edit documents.
- How to record computer and laptop screens with sound and edit videosbesides taking screenshots, you can also record your computer screen to record impressive moments while playing games, instructions for installing software or livestream on your computer. refer to some computer screen video recording software and follow the instructions to learn how to record laptop and pc screens.
- How to record video from webcam on Ubuntu, Linuxin the previous article tipsmake showed you how to record your computer screen without installing additional software. the next article below tipsmake will guide you how to record video from webcam on ubuntu, linux.
- How to check Linux computer configurationthere are many ways to check linux computer configuration, of which the simplest way is to use commands. the article below tipsmake will guide you how to check linux computer configuration through commands.
- Top 4 best password management software to useremembering passwords for many different accounts always gives you a headache, so to simplify and avoid losing passwords, you can use specialized password management applications and software. , helping you not have to try to take notes, or try to remember the password every time you need to use it. the top password management software below will help you easily remember different types of passwords.