====== Ubuntu - Node.js - Install node.js ======
[[Ubuntu:Install node.js:Install from Source|Install from Source]]
----
===== Update your system =====
sudo apt-get update
sudo apt-get install git-core curl build-essential openssl libssl-dev python
----
===== Install Node.js =====
==== Clone the Node.js repository: ====
git clone https://github.com/nodejs/node.git
cd node
**NOTE:** If you require a specific version of Node:
git tag # Gives you a list of released versions
git checkout v13.10.1
==== Compile and install Node ====
./configure
make
sudo make install
**NOTE:** This might take a while, depending on your hardware.
==== Check if node was installed correctly ====
node -v
----
===== Install NPM =====
curl -L https://npmjs.org/install.sh | sudo sh
**WARNING:** Running a script directly from the web can be dangerous, as it may contains trojans.
Instead, you may want to download the script, and then review the contents before actually installing it.
----
==== Test ====
npm -v