Posted Jan 9, 2011 2011-01-09T20:00:00+02:00 by Rahul Chandna
Updated Aug 14, 2021 2021-08-14T14:23:34+02:00
- Create file called limits.conf
- Add limits configuration to the limits.conf
Assuming user that you want to increase limits for is called ‘java’
1
2
| $ echo "java soft nofile 8196" > limits.conf
$ echo "java hard nofile 65536" >> limits.conf
|
- Move file to /etc/security
1
| $ sudo mv limits.conf /etc/security
|
- if file already exists in /etc/security
Then directly append contents to the file
1
2
| $ sudo echo "java soft nofile 8196" >> limits.conf
$ sudo echo "java hard nofile 65536" >> limits.conf
|
- Verify that limits have been applied correctly
1
2
3
4
5
| $ ulimit -Hn
unlimited
$ ulimit -Sn
8196
|