Installing a custom version of NodeJS on Ubuntu 13.10

The following is the quickest way to install nodejs latest and specific versions node.js on Ubuntu. According to the nodejs official gists, there are a few other ways to install node.js, and you can check out the other possibilities if you prefer.

# Adding yourself to the group to access /usr/local/bin
ME=$(whoami) ; sudo chown -R $ME /usr/local && cd /usr/local/bin

mkdir _node && cd $_ && wget -O - | tar zxf - --strip-components=1

# Making the symbolic link to node
ln -s "/usr/local/bin/_node/bin/node" ..
# Making the symbolic link to npm
ln -s "/usr/local/bin/_node/lib/node_modules/npm/bin/npm-cli.js" ../npm

You can replace the v.0.11.10 in the script above with any version from the list of all nodejs versions

If you just wanted the official latest release you can also do:

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

Jason Kulatunga

Build Automation & Infrastructure guy @Adobe. I write about, and play with, all sorts of new tech. All opinions are my own.

San Francisco, CA

Subscribe to Sparktree

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!