Node.js is an open-source software that is available for free download on the Node.js download page.
For example, to install Node.js LTS (v12.x) on Ubuntu, you can run the following commands:
curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
Running a JavaScript application with Node.js is quite simple. Let's create a file called index.js with the following content:
console.log('Hello World');
Save the file and run the following command in the command line:
node index.js
Output:
Hello World