What is the Linux equivalent of Windows Registry? If there is no equivalent or similar structure in Linux, how are the things that are done by the Windows Registry handled in Linux?
Linux applications typically store their config in a text-based file specific to the application. Machine specific configs are typically stored in the /etc directory tree. User specific settings are typically in the users' home directory and often in "hidden" files that start with a "." (use 'ls -a' to see them).
/proc for kernel related stuff
/etc for software related stuff
Gnome config can be considered similar to Windows Registry as well.
But since Linux and Windows core philosophies are diametrically different (Linux ~ open and compatible, Windows ~ closed and obstructive), there is no direct parallel.
Edit: for those who disagree, here is a bit of history for you: http://www.faqs.org/docs/artu/ (awesome reading, no matter what your background is)
Most applications use text-based configuration files (usually each program has its own format, although some use XML or JSON). System-wide configuration is kept under
User configuration is usually stored in the user's home directory, in so-called "dot files" (filenames starting with a "
ls -a to display them). To avoid "dotfile creep", recently programs have started keeping their configuration in
~/.config/ per XDG Base Directory specification.
It's split on Linux. There is not one single place.
For programs run by users, it's usually in $HOME/.someprogramrc if it's a file, or $HOME/.somedirname if complicated enough to warrant a subdirectory. KDE apps all find subareas of $HOME/.kde I believe, usually not generating their own dir.
The common action for listing directories is to treat files starting with
. as hidden, so you'll need to use
ls -A from the command line, or use the
show hidden files setting of your gui.
For programs run by the system, it's usually a file someplace in
/etc/ There's not a true naming convention in etc, though directories are usually signified by
.d at the end.
For the kernel, it's in
/etc/sysconfig.conf, or a startup script in /etc/init.d that writes to /proc/sys/*
Most system configs are in
/etc to make it easier to back up a system. By holding only config files and not binaries,
/etc/ therefore tends to be small.
The equivalent of the registry on Linux is Elektra but it is not very popular. Most software uses a configuration file located in the /etc directory.
https://en.wikipedia.org/wiki/Windows_Registry - The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and user interface can all use the registry. The registry also allows access to counters for profiling system performance.
In simple terms, the registry or Windows Registry contains information, settings, options, and other values for programs and hardware installed on all versions of Microsoft Windows operating systems. For example, when a program is installed, a new subkey containing settings such as a program's location, its version, and how to start the program, are all added to the Windows Registry.
When introduced with Windows 3.1, the Windows Registry primarily stored configuration information for COM-based components. Windows 95 and Windows NT extended its use to rationalise and centralise the information in the profusion of INI files, which held the configurations for individual programs, and were stored at various locations. It is not a requirement for Windows applications to use the Windows Registry. For example, .NET Framework applications use XML files for configuration, while portable applications usually keep their configuration files with their executables.
The Windows registry was created to automate the various .ini and other configuration files for operating system and programs so that it would load faster. All of the information in the registry is also contained elsewhere in the computer but today they are usually write protected. Linux uses Vi (visual editor) or other editor to access these configuration files in Linux to edit them.
Windows: - Stores the data in files within the directory hierarchy - These files are like the mentioned .dll and other supporting files - Then the files are managed through management systems like databases (the Registry) to provide easier interaction with the user(s). - This means we point and click, but TONS of data is recorded in the background for ease of use, faster accessibility and unnecessary data storage in the name of easier usage.
Linux: - Files are stored in the separated partitions (we have to remember, in Linux, we can access hardware more directly, including the screen - everything is accessible through the CLI). - These files are in the directory hierarchies already in place (in the storage system of the OS, similar to Windows but not just separated by folders) - The files are more readable, easier to access, but they require the knowledge of the CLI's to be able to utilize them.
Primary Difference: Windows adds the databases "layer" to the OS interface to manage the interactions from the user, system, etc. This makes it "easier" to utilize the GUI to access and perform everything, but it also makes the user and system highly dependent on this database system for most functionality. Linus on the other hand, allows direct interfacing with the components, meaning you are having to know the "language" to type in lieu of the Windows point-and-click methods. Yes, you can utilize a CLI through Windows, but then you are not truly comparing the Windows to Linux comparison. The differences are in how the user accesses the data, how the system utilizes the data, and how Windows simply adds more "management" (by the system) to produce an "easier" interface than knowing your way around a command line.
It is an understandable comparison to assess as someone new to the CLI/Linux environment, but it makes a lot more sense when you apply the intent of both of these systems first. Linux is not "subverting the attempts Microsvck has made with the integration of a Registry", it is giving the user more power by eliminating layers of abstraction between the user and the hardware.
To imagine this, think of a typewriter. You press the keys, they move the gears and you hammer the ink to paper producing data. In Linux, a user enters commands to interface with the system kernel to perform actions in the hardware. In a Windows environment, you have more potential layers between the user and the hardware. Applications can invoke commands which communicate with the OS, which interfaces with the system/kernel, which then works with the hardware. This process becomes more complicated in Windows as more variables enter the equation, like the commands having to interact with the Registry to retrieve information prior to being able to execute things... and this is why Windows uses more resources to run, do basic and complex tasks. Preloaded services and processes are loaded to allow management of functions that Linux would require the user to invoke. And yes, there are processes that run in Linux, but I am trying to just give a basic idea of how the systems differ to better display why some other comments have been inaccurate. The idea of using Linux is to minimize the interfaces between user and hardware, keeping things simpler with much less clutter. Windows tailors to the users and tries to encompass more functionality in a more easily accessible way, but it comes at the cost of complex management systems (that can easily become cluttered and problematic). The Registry can also provide a digital trail of all physical connections and other physical interactions with hardware that is just saved and saved (unless cleaned by a user/program). I'd prefer to have readable files that I can manually delete when not used, compared to cleaning the various/many spots needing regular cleaning in Windows (and potentially risking BIG problems b/c of the Registry). It is just another layer to manage things behind the scenes and establish more of a digital trail that the user gets stuck storing.
Unfortunately, many users are conditioned to Windows and are too fearful of Linux prior to trial. There are so many flavors, some having differing commands, shells, etc. which becomes difficult to choose as a beginner. Once we remove our "Windows conditioning", it becomes clearer that Linux distros are superior in many ways (w/o the bloated software). The only scenario I personally feel Windows is superior for is playing games. It becomes more disturbing as MS pushes more to unify to 1 OS at a time, always wanting to get more data from you. It is a good skill to have, and playing with a Linux distro can potentially answer these questions for new users reading these posts.