Open File Limit

I need to look this up every once in a while, and it’s not as easy to find as I like, so it lives here now.

To increase the open file limit for all users on pam-based Linux:

$ ulimit -n
1024
$ sudo bash
$ echo '* - nofile 65535' >> /etc/security/limits.conf
$ echo 'session required /lib/security/pam_limits.so' >> /etc/pam.d/login
# logout. login.
$ ulimit -n
65536