
$ – requires given linux commands to be executed as a regular non-privileged user # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command Privileged access to your Linux system as root or via the sudo command. Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa Requirements, Conventions or Software Version Used We also learned how to uninstall NodeJS from Ubuntu and clean up space.Installation of Node.js and NVM on Ubuntu 20.04 LTS Focal Fossa Software Requirements and Conventions Used Software Requirements and Linux Command Line Conventions Category

Great! We have successfully installed and tested the installation of NodeJS. To remove both the package and the configuration files run: sudo apt-get purge nodejsĪs a final step, you can run the command below to remove any unused files and free up the disk space sudo apt-get autoremove The command will remove the package but retain the configuration files. If you wish to uninstall NodeJS from your Ubuntu system, run the command below. Now open your browser and browse the server’s address as shown Uninstall NodeJS from Ubuntu Ensure the port is allowed on the firewall of your system. Sample Output This will display the content of the application on port 3000. Res.end('Congratulations! node.JS has successfully been installed !\n') Ĭonsole.log('Server running at Save and exit the text editor Start the application using the command below node nodeapp.js We are going to create a web server that displays the text “Congratulations! node.JS has successfully been installed !” Let’s create a NodeJS file and call it nodeapp.js vim nodeapp.jsĪdd the following content var http = require('http') This is an optional step that you can use to test if NodeJS is working as intended. Sample Output Step 4: Creating a Web Server demonstration Step 3: Verfiying the version of NodeJS and NPMĪfter successful installation of NodeJS, you can test the version of NodeJS using the simple command below. Sample Output This command not only installs NodeJS but also NPM (NodeJS Package Manager) and other dependencies as well.

Step 2: Install NodeJS on UbuntuĪfter successfully adding the NodeJS PPA, It’s time now to install NodeJS using the command below. Sample Output Great! In our next step, we are going to run the command for installing NodeJS.

sudo apt-get install software-properties-common To start off, add the NodeJS PPA to your system using the following commands. Step 1: Adding the NodeJS PPA to Ubuntu 18.04 In this guide, we delve in and see how you can How to install NodeJS on Ubuntu 18.04. NodeJS is a JavaScript framework that allows you to build fast network applications with ease.
