Skip to content

Instantly share code, notes, and snippets.

@multidis
Last active December 23, 2015 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save multidis/f918e5868988bef11e44 to your computer and use it in GitHub Desktop.
Save multidis/f918e5868988bef11e44 to your computer and use it in GitHub Desktop.
Node.js providing `node` and `npm` commands on Ubuntu 14.04.
# use Node.js-maintained repositories
# http://www.hostingadvice.com/how-to/install-nodejs-ubuntu-14-04/
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs
# update npm
sudo npm install --global npm@latest
# verify
node --version
npm --version
# another set of instructions: update node using npm itself
# http://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
## see mkdir-output and use it below in place of <version>
## verify the last part is what `which node` shows
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/local/bin/node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment