how can I see what ports mongo is listening on from mongo shell? December 26, 2022 by Tarik You can do this from the Operating System shell by running: sudo lsof -iTCP -sTCP:LISTEN | grep mongo