NodeJS is one of the most popular technology for developing web application, you can use nodejs for backend as well as frontend. In this tutorial i'm going to show you how to install the latest nodejs on xubuntu 18.04 bionic.
You can install nodejs in many different ways, but in my opinion the best way to install nodejs and npm is by using nvm (node version manager). Because with nvm you can switch from one version to another easily.
Step by step how to install NodeJS on Xubuntu 18.04
- run update command
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install curl
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
source ~/.bashrc
nvm -v
nvm install --lts
To install specific version of nodejs, you can run nvm install followed by the nodejs version that you want, for example if you want to install nodejs 8.11.3 then the command would be like this:
nvm install v8.11.3