Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hawkup/c26a6897cde72c8f27c5 to your computer and use it in GitHub Desktop.
Save hawkup/c26a6897cde72c8f27c5 to your computer and use it in GitHub Desktop.
update or install latest nodejs on Ubuntu 14.04

check latest nvm version from this

https://github.com/creationix/nvm

install latest version

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash

install latest nodejs

nvm install 0.12
nvm use 0.12
node -v

on mac, put this at the end of file ~/.bash_profile or ~/.profile

[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh 

if you want to remove nodejs

sudo apt-get remove nodejs

default node version

nvm alias default {version}
#example
nvm alias default v0.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment