What is .d file in linux

WBOY
WBOYOriginal
2022-03-24 11:45:5712636browse

The ".d" file in Linux represents: 1. Dependency file, where d means dependence; 2. Default configuration file, where d means default; 3. Dynamic file, where d means Dynamic.

What is .d file in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What is .d file in Linux

  • Dependency file: dependence

  • .d may also mean default, Indicates the default (configuration) file,

  • may also mean Dynamic, indicating a file with dynamic meaning.

Folders with .d are relatively common. For example, there are many ,, under /etc, indicating that there are system default configuration files under the folder.

Generally, in order to maintain compatibility with the original configuration method, the .d ending directory is added.

For example: /etc/X11/xorg.conf This was originally a file, but now there is also a directory such as /etc/X11/xorg.conf.d. The relevant settings of the graphics card driver were originally placed in /etc In the file /X11/xorg.conf, in order to make the configuration file concise and flexible, the configuration can be allocated according to the situation and thrown into /etc/X11/xorg.conf.d... like "rules" To add... the system will automatically go to /etc/X11/xorg.conf.d to find these rules and set them according to the rules. This can maintain the previous /etc/X11/xorg.conf method compatibility.

Another example: In yum-based distributions, /etc/yum.repo is the yum configuration file. You can throw all yum sources into the yum.repo file. Now you can also put different sources All configuration files are thrown into /etc/yum.repo.d, and only some common configuration options are set in yum.repo. In this way, any source that is no longer wanted can be deleted from /etc/yum.repo.d. As long as it doesn't affect other things, the same principle applies if you add more sources.

There are also /etc/env.d, /etc/profile.d, /etc/udev.rules.d, etc... They are all the same~

Related recommendations: "Linux video tutorial

The above is the detailed content of What is .d file in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn