open a terminal and enter
node -v
this will tell you the version of the nodejs installed, then run nodejs simple by entering
node
Prompt must be change. Enter following,
function testNode() {return "Node is working"}; testNode();
command line must prompt the following output if the installation was successful
'Node is working'