If I have a mongo instance running, how can I check what port numbers it is listening on from the shell? I thought that db.serverStatus() would do it but I don\
db.serverStatus()
Try the followed command, this one work for me:
sudo lsof -iTCP -sTCP:LISTEN | grep mongo