I ran ulimit -n and it is current showing as 1024. I want to increase my file limit from 1024 to 4084. So, i tried running the following command
sudo ulimit -n 2048
but i get the following error
sudo: ulimit: command not found
How to increase the file limit from 1024 to 4084. Any help will be appreciated.

If you are root, execute the command below
ulimit -SHn 65535If you want to set it permanently, especially for a particular user, change the file /etc/security/limits.conf to have the following lines (assume user = www-data)
E.g.
www-data hard nofile 65535
www-data soft nofile 65535
And make sure uncomment pam_limits.so from the different files under /etc/pam.d, e.g. sudo, login, sshd, ...
Finally restart your system
Source:
http://www.linuxask.com/questions/increase-the-maximum-number-of-open-files-file-descriptors
- Visitor 4 weeks 3 days ago