Installing Ionic framework- setting up env variables - Not working.

I am new to JS and I am planning to build a simple application

I was installing ionic and cordova using npm -g install ionic, did the same for cordova also.

it gets installed in /usr/local/lib/ionic this ionic points to -> /usr/local/lib/node_modules/ionic/bin/ionic

I basically get this

/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
ionic@1.2.8 /usr/local/lib/node_modules/ionic
├── connect-livereload@0.4.0
├── progress@1.1.7
├── open@0.0.5
├── colors@0.6.2
├── ncp@0.4.2

Now how do I set my env variables?

export IONIC="/usr/local/lib/node_modules/ionic"
export PATH=$PATH:$IONIC/bin

Is this right?

I also tried downloading the ionic files, put them under /home/softwares/ionic and changed the bashrc to

export IONIC="~/softwares/ionic"
export PATH=$PATH:IONIC

what about this? TO put it short, npm install of ionic does not work. so if i ionic -v or try ionic start blahblah blank nothing comes up.

Change your node link:

#Run

which node
#and in my case it displayed /usr/sbin/node.

#If it says command not found, skip to 3. Remove it by

sudo rm /usr/sbin/node
#Run

which nodejs
#in my case it displayed /usr/bin/nodejs.

#Make a link

sudo ln -s /usr/bin/nodejs /usr/bin/node 
#OR

sudo ln -s /usr/bin/nodejs /usr/sbin/node 

ref: "Ionic start projectName" not working with Ionic Framework