I open terminal and enter the following commands
sudo mongod
which then outputs
[initandlisten] waiting for connections on port
I am in ubuntu 14.04 and mongod is registered as an upstart service. The answers in this post sent me in the right direction. The only adaptation I had to do to make things work with the upstart service was to edit /etc/mongod.conf. Look for the lines that read:
# Enable the HTTP interface (Defaults to port 28017).
# httpinterface = true
Just remove the # in front of httpinterface and restart the mongod service:
sudo restart mongod
Note: You can also enable the rest interface by adding a line that reads
rest=trueright below the httpinterface line mentioned above.