mongodb version check in ubuntu code example
Example 1: how to check mongodb status in ubuntu
sudo systemctl status mongodb
Example 2: command to check mongodb version
mongod --version
sudo systemctl status mongodb
mongod --version