Monthly Archives: May 2015

Installing node js on Ubuntu using NVM

Node JS can be installed using various methods, but in this post I am going to show you how to install it using NVM (Node Version Manager)

To install NVM through curl

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

or Wget:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.25.1/install.sh | bash

The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc or ~/.profile).

After this restart PC / VPS to make command NVM available. You will get list of options when you type NVM in your terminal.

Now you can run

nvm install version_name

at the time of writing, latest version of nodejs is 0.12.3. So this can be

nvm install 0.12.3

dev@devenubuntu:~$ nvm install 0.12.3
######################################################################## 100.0%
Now using node v0.12.3 (npm v2.9.1)

You can verify the installation by running

dev@devenubuntu:~$ node -v
v0.12.3

Ubuntu – what to do when everything freezes?

(this post is just for a personal reference)
If it locks up completely, you can REISUB it, which is a safer alternative to just cold rebooting the computer.

REISUB by:

While holding Alt and the SysReq (Print Screen) keys, type REISUB.

R: Switch to XLATE mode
E: Send Terminate signal to all processes except for init
I: Send Kill signal to all processes except for init
S: Sync all mounted file-systems
U: Remount file-systems as read-only
B: Reboot
REISUB is BUSIER backwards, as in “The System is busier than it should be”, if you need to remember it. Or mnemonically – R eboot; E ven; I f; S ystem; U tterly; B roken.

In case you like mnemonics: Raising Elephants Is So Utterly Boring, or Reboot Event If System Utterly Broken. I’ve also seen it as RSEIUB (Raising Skinny Elephants is Utterly Boring)

Reference: http://askubuntu.com/questions/4408/what-should-i-do-when-ubuntu-freezes?page=1&tab=votes#tab-top