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
$ sudo bash
$ echo '* - nofile 65535' >> /etc/security/limits.conf
$ echo 'session required /lib/security/' >> /etc/pam.d/login
# logout. login.
$ ulimit -n