Change ulimit values permanently for a user or all user in Linux

In this article, we explained how to change ulimit values permanently for a user or all user in Linux.
The ulimit is a mechanism to restrict the number of various resources a process can consume. There’s a shell command to set the ulimit for processes that are started in that shell.
It will provide control over the resources a user or a process in a shell can use.  You can list the current setting of ulimit values by login as your user and type the following commands
# ulimit –Hn 4096
# ulimit –Sn 1024

Default values should be 4096 and 1024 respectively.

ulimit -Sv 500000     # Set ~500 mb limit

So it will also determine the number of open files a user can open or edit. For increasing the ulimit, you need to change those parameters in a configuration file

vi /etc/security/limits.conf    
* hard nofile 50000  // we have mentioned to all user(*)
* soft nofile 50000 // we have mentioned to all user(*)

This how you can change ulimit values permanently for a user or all user in Linux

thanks for reading this article, you’ll also like