Cant find the mongod.conf file

For the config file lab, I added the required settings to the mongod.conf file and then tried to run mongod -f mongod.conf. But it comes back with a:
Error reading config file: No such file or directory
try ‘mongod --help’ for more information

What am I missing?

Post a screenshot of the whole IDE that shows what you did and the error you are getting.

The context might help us figure out the issue.

1 Like

use ls to see if you have mongod.conf file in that folder. if not, either you managed to delete it, or you have changed the folder.

use pwd to see if you accidentally changed your working folder. if you don’t see /root/workspace, then use cd /root/workspace

finally, make sure you are giving the right configuration file name in the command. either write manually and carefully, or just copy-paste from the lecture note (also written in config file)


This worked. Thanks for your help.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.