ulimit
Linux · System · reference only
What it does
Shows and sets the resource limits of the current shell and the processes it launches, such as open files or processes.
Syntax
ulimit [opciones] [límite]
Options and parameters
-aShows all current limits.
-nMaximum number of open files.
-uMaximum number of processes for the user.
-cMaximum size of core dumps.
-sMaximum stack size.
-tMaximum CPU time, in seconds.
-HActs on the hard limit, which cannot be exceeded.
-SActs on the soft limit, the one applied by default.
Usage examples
ulimit -aShows all the shell's limits.
ulimit -nShows how many files a process can open.
ulimit -n 4096Raises the open file limit for this session.
ulimit -HnShows the hard limit of open files.
Notes and common mistakes
- It only affects the current shell and its child processes.
- For permanent limits, configure /etc/security/limits.conf.