Install nodejs on Ubuntu 16.04 LTS from tar
|Official Nodejs Logo|
Download Linux Binaries
First of all you need to download nodejs Linux Binaries that are available from nodejs.org downloads.
You have downloaded the file to your desktop and the name of the file is node-v6.9.5-linux-x64.tar.xz . Now open your terminal from Desktop. If you open terminal from anywhere else then relocate to Desktop using cd command.
If you do not have xz-utils installed then run the following command:
sudo apt-get install xz-utils
After that run the command below:
sudo tar -C /usr/local --strip-components 1 -xJf node-v6.9.5-linux-x64.tar.xz
Be careful about the file name (red marked).
After that, to check if you are done run this command:
You should get the version number of currently installed node.