Mongod Configuration File Extension

I just finished watching the lesson on the Mongod Config file, which shows that the file extension is .conf, but on my PC (Windows 11) it’s actually .cfg.

Why is it different?

Welcome to the MongoDB Community Forums @Gyen_Abubakar!

The MongoDB configuration file does not have a specific required extension, so the naming generally follows platform conventions: .conf for Linux/Unix/MacOS or .cfg for Windows. Most operating systems will conveniently associate these common file extensions with a text editor so you can double-click to edit from a GUI file explorer.

Configuration files are plain text files, so you can use any preferred extension. For example, modern MongoDB configuration files use the YAML format so .yaml or .yml extensions would also be reasonable.

Regards,
Stennie

2 Likes

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