I edited /etc/security/limits.conf
to have
root hard nofile 20000
root soft nofile 10000
And added
session required pam_limits.so
to /etc/pam.d/common-session
and /etc/pam.d/common-session-noninteractive
.
After reboot and relogin ulimit -n
still shows 1024.
If I do su
and try ulimit -n
again then it shows 10000. But after a relogin it goes back to 1024.
/etc/security/limits.conf
. See http://unix.stackexchange.com/questions/108603/do-changes-in-etc-security-limits-conf-require-a-rebootAlso, I think http://serverfault.com/questions/356962/where-are-the-default-ulimit-values-set-linux-centos might answer your question.
– Alexej Magura Dec 15 '14 at 05:03