Many companies use Node.js to improve the performance of their website. This type of technology is widely used by developers, as it facilitates their work on networks. You may have heard of Node.js and want to install it or maybe you already have it and want to update it. Here we will show with install or update mo NodeJS in Ubuntu quickly and easily.
Nodo.js
It was created with the purpose of being practical for the creation of network programs, for example web server. Its founder was Ryan Dahl in 2009 and its development was sponsored by the Joyent company. Node.js technology is well known and used by developers to optimize any web application.
Node.js is a server runtime scope that allows JavaScript to run without the client. It is also a free cross-platform, very practical and useful for all kinds of educational or business projects.
How to install or update Node.js on Ubuntu
Before installing Node.js it is important to log into your server and execute the commands using sudo. Installing Node.js in Ubuntu is easy when you do from an official repository. Proceed with the following steps:
- On the Ubuntu system you have to open a terminal emulator from the main menu; once connected, mitigate the APT cache and run the following command: sudo apt upadate.
- Performing this process ensures that the repository is synchronized and that the system securely downloads what is stored in them.
- Then you can run the installation of Node.js by running the following command: sudo apt install nodejs.
- Next, you need to enter the password and this will start the installation process. Additionally, you have the option to install NPM, a Node.js package manager. Which can be done via this command: sudo apt install npm.
- To verify the installation you need to run this command: node.js -v.
- In case you want to remove Node.js, run the following command: sudo apt remove nodejs.
Install Nodejs on Ubuntu and NVW
There are other ways to install Node.js on an Ubuntu 18.04 server, using an NWN. To install, you can select a specific version. Follow the next steps:
- You have to download NWM using wget; In case you are not sure you are using wget, run the following command: sudo apt install wget
- Then proceed with this command: wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
- For the NWM to be used by the bash profile on your user, run the following command: source ~ /.profile
- Once ready, you can use NWM and show the versions of Node.js to install: nvm ls-remote
- There you can choose what you want. For better stability and support, version 10.15.1 is recommended. For this you need to run this command: nvm install 10.15.1
- To make sure Node.js is installed, run this command: node -v.
You can now start using Node.js in Ubuntu. In case you want to uninstall it, deactivate it first with this command: nvm deactivate. Then you can uninstall Node.js with this: nvm uninstall v10.15.1
As you can see, installing or updating Node.js in Ubuntu is a very simple and fairly fast process, as long as you do it from an official site.
Also, having this technology will allow you to improve any type of web application. When you download Node.js in Ubuntu, make sure you type the commands correctly and follow the steps we describe in this article to avoid any inconvenience.
We hope you enjoyed this post, write your own comments. Your opinion is important to us, it helps us improve our content. Remember to use appropriate language and share this information with family and friends.