The command ‘brew services start’ is used to start the service so that MongoDB runs in the background.