check to see if mongodb is running code example Example: how to check mongodb status in ubuntu sudo systemctl status mongodb