Hey fellows in this post I will cover how to install the npm and node in linux. In this post we will cover the following points
Let's get started
Step 1: Go to the nodejs site
Step 2: Click the LTS recommended for the most user button to download the node
Step 3: NodeJs Setup must be started to download
Step 4: Extract the tar file to anywhere you like.
I will extract my tar file at /home/username
for easy reference
Type or copy paste this command on terminal -->
tar -xvf node-v14.15.4-linux-x64.tar.xz && mv node-v14.15.4-linux-x64 nodeJs && sudo mv nodeJs /home/username
Step 5: Go to your /home/username folder and press Ctrl + h
to unhide the hidden files
Step 6: Open the .bashrc
file in the text editor or IDE
Step 7: Go to the end of the file and paste this line of code
export PATH=your_location_here:$PATH
In my case I will provide mine as fellows
export PATH=$HOME/nodejs/bin:$PATH
The above code line is adding the nodejs path to the system environmental variables so you can access it from anywhere
Now open the new terminal window or tab
Check the version of the node with the following code
node --version
This line of code should display the version of the node application as shown below: