0

In a CentOS/RHEL machine, the limit of user processes can be defined in /etc/security/limits.conf as well as in /etc/security/limits.d/20-nproc.conf

What is the difference in those two values contained in the above files?

  • No difference. Usage of limits.d is just for separation – Romeo Ninov May 22 '17 at 13:08
1

The Red Hat KB notes:

After reading /etc/security/limits.conf, individual files from the /etc/security/limits.d/ directory are read. The files are parsed one after another in the order of "C" locale. So the order will be special characters, numbers in ascending order, uppercase letters and lowercase letters in alphabetical order. If two files have same entry, then the entry read last will be taken in effect. Only files with *.conf extension will be read from this directory.

A directory of configuration fragments offers the ability for various packages to provide the settings they need. A Debian mailing list item offers this insight:

Once upon a time, most UNIX software was controlled by a single configuration file per software package, and all the configuration details for that package went into that file. This worked reasonably well when that file was hand-crafted by the system administrator for local needs.

When distribution packaging became more and more common, it became clear that we needed better ways of forming such configuration files out of multiple fragments, often provided by multiple independent packages. Each package that needs to configure some shared service should be able to manage only its configuration without having to edit a shared configuration file used by other packages.

The most common convention adopted was to permit including a directory full of configuration files, where anything dropped into that directory would become active and part of that configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.