Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I find my node.js files in linux, /usr/bin/node is not working

Tags:

I want to find where is my node.js in ubuntu linux system, the command: which node gives me the path of /usr/bin/node, but when I go to that folder, there is no node folder and files.

can somebody help me?

I installed the node.js by this:

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
like image 362
user824624 Avatar asked Nov 17 '13 14:11

user824624


People also ask

Where is node js path in Linux?

By default, the installer uses the Node. js distribution in C:\Program Files\nodejs. The installer should set the C:\Program Files\nodejs\bin directory in window's PATH environment variable.

Where are node js files stored?

You put them in whatever folder you want. It is common practice to put each application in a different folder.


2 Answers

In order to find the installation path, write the below command in the terminal:

which node

If it doesn't succeed, try this one:

which nodejs

Same thing for finding npm installation path:

which npm

If you are on Windows, write where instead of which

Hope, it helps :)

like image 61
user33192 Avatar answered Oct 08 '22 08:10

user33192


running dpkg-query -L nodejs will list the full path to every file belonging to the nodejs package. If /usr/bin/node is not there (it should be a symlink to /usr/bin/nodejs), then something went wrong with the apt-get install.

like image 32
Peter Lyons Avatar answered Oct 08 '22 07:10

Peter Lyons