The limits.conf file is actually a pam_limits.so configuration file in the Linux PAM (plug-in authentication module, pluggable authentication Modules), and only needles for a single session.
The limits.conf format is as follows:
username| @groupname Type Resource limit
username| @groupname: Sets the user name that needs to be restricted, the group name is preceded by the @ and the user name differs. You can also use the wildcard character * to restrict all users.
Type: Soft,hard and-,soft refer to the setting values that are currently in effect for the system. Hard indicates the maximum value that can be set in the system. The soft limit cannot be higher than the Har limit. -The soft and hard values are also set.
Resource
Core-limits the size of the kernel file
Date-Maximum data size
Fsize-Maximum file size
Memlock-Maximum lock memory address space
Nofile-Maximum number of open files
RSS-Maximum Persistent setting size
Stack-Maximum stack size
CPU-Maximum CPU time in minutes
Noproc-Maximum number of processes
As-address space limitations
Maxlogins-Maximum number of logons allowed by this user
Example: Modify file descriptor size (65536)
Vi/etc/security/limits.conf
* Soft Nofile 65536
* Hard Nofile 65536
Make these restrictions effective
(1) Determine the files/etc/pam.d/login and/etc/pam.d/sshd contain the following lines:
Session Required Pam_limits.so
(2) vi/etc/security/limits.d/90-nproc.conf
To modify the comment content:
* Soft Nproc Unlimited
(3) The user can then log in again to take effect.
You can use ulimit-a under Bash to see if you've modified
Linux limits.conf Configuration