Debian ulimit - change maximum number of open files for a user

The command ulimit -a shows all limits that are imposed on the current user.

Debian default is 1024 open files per user. This can be increased (only by the super user) by editing the following files:

Uncomment the line
session required pam_limits.so

in the file '/etc/pam.d/su'.

In /etc/security/limits.conf, add the following lines:

username soft nofile 2048
username hard nofile 2048

Change username and 2048 to appropriate values.

The changes will be accepted after a re-login (check ulimit).