Change the RLIMIT_NPROC in linux

2019-09-08 04:21发布

问题:

I;m trying to find a way to change the RLIMIT_NPROC value in my RedHat linux machine. So far I wasn't able to find a proper way to do so. Is there a simple way to change it without using c/c++ , just by using the command line or editing a specific file.

Thanks in advance!

回答1:

take a look at /etc/security/limits.conf or /etc/security/limits.d/ if the latter exists in your installation. Don't forget to re-login afterward



回答2:

the classic linux command to handle this was ulimit.

recently it has been superceded by getrlimit, setrlimit and sysconf

your distro may have specific config files ususally in /etc/security/limits.conf



标签: linux