Obviously, Linux does not have a registry. However, just like the .NET framework, Mono provides the Microsoft.Win32.Registry class for accessing the registry. So how does it work on Linux?
First, I would like to state that personally, I never use the registry. I hate using it for lots of reasons. But I do have situations where third party frameworks use the registry, and I use these framework on Mono/Linux, and hence I become dependent of it.
System wide settings
The system wide settings which are shared between users, e.g. HKCR, are stored in /etc/mono/registry. E.g. in /etc/mono/registry/ClassesRoot/. In this sub directory sub keys are stored as sub folders, and values are stored in xml files with the name values.xml:
<values> <value name="Content Type" type="string">application/msword</value> </values>
This example is from /etc/mono/registry/ClassesRoot/.doc/values.xml.
User settings (e.g. HKCU) are stored in the same way, but in the sub folder .mono/registry to the users home directory instead, e.g. ~/.mono/registry/CurrentUser.
Finally, if you are running a web app, please remember to ensure correct security settings if the web app should have access to specific or all registry settings. For example:
chmod 777 /etc/mono/registry/ClassesRoot -R
This will allow read and write access to ClassesRoot and all sub folders. Often you can loosen up on Linux registry settings security compared to Windows, but please remember to be careful.