

So, to avoid such problems just create some files with this command touch ~/.bash_profile ~/.bashrc ~/.zshrc ~/.profile. We can directly install NVM using curl but in some cases, you may run into a problem. If you’re wondering what this NVM is then it’s a node version manager which helps us to easily install and switch between different versions of node.Īctually installing NVM is also simple.

You can use the same command node -version and you get the nodejs version and npm -version returns the npm version. If you verify if it’s actually installed or not. Then type your password and your nodejs is installed. Here we have to copy some folders from this directory(downloads) to our user(/user) directory. Now, right-click and open the terminal here. You'll have all the necessary folders here. Then extract the tar file by right-clicking on it and click on extract here. After the download is completed, go to the directory where you've downloaded your nodejs. Click on downloads tab then choose linux binaries. To install linux binaries, just open up your browser and head over to. To check the version just type the command node -version and you get the version.

Then we use the command sudo apt install nodejs, press enter, wait few seconds and you find your nodejs is successfully installed. Copy this command sudo apt update & sudo apt upgrade and paste here, hit enter, and type your password. To install nodejs with apt package manager, just open up your terminal. Installation of Nodejs is insanely easy with apt package manager in linux. You can feel comfortable following the same process in any ubuntu-baseds distro you use.ġ. In this article, I will show you three different ways of installing Nodejs in linux. Installing node in linux is quite challenging sometimes, especially if you are a beginner and don't have any idea on how to do that.
