$linuxjunkies
>

ulimit

also: resource limits, process limits

A shell built-in command that sets or displays resource limits for processes, controlling maximum CPU time, memory usage, file size, and other system resources.

ulimit is a bash/sh built-in that enforces hard and soft limits on system resources available to a shell and its child processes. Soft limits can be increased up to the hard limit; hard limits cannot be exceeded without root privilege.

Common options include -c (core dump size), -m (virtual memory), -n (open file descriptors), -t (CPU time in seconds), and -v (virtual memory in KB). For example, ulimit -n 1024 sets the maximum number of open files to 1024.

System administrators use ulimit to prevent resource exhaustion—a buggy process consuming all memory, or a fork bomb opening unlimited files. The /etc/security/limits.conf file persists limits across sessions for specific users or groups.

Related terms