LinuxCommandLibrary

ulimit

TLDR

Show all limits

$ ulimit -a
copy
Show file size limit
$ ulimit -f
copy
Set open files limit
$ ulimit -n [4096]
copy
Show stack size
$ ulimit -s
copy
Set unlimited stack
$ ulimit -s unlimited
copy
Show hard limits
$ ulimit -Ha
copy

SYNOPSIS

ulimit [-a] [-f] [-n] [-s] [-H] [-S] [value]

DESCRIPTION

ulimit controls resource limits. It's a shell builtin.
Process limits. CPU, memory, files.
Soft and hard limits. User vs system.
Per-session settings. Shell scope.
Security control. Resource management.

PARAMETERS

-a

All limits.
-f
File size.
-n
Open files.
-s
Stack size.
-H
Hard limit.
-S
Soft limit.

CAVEATS

Shell builtin. Settings not persistent. Root for hard limits.

HISTORY

ulimit is a standard Unix shell builtin for controlling resource limits, available in bash, zsh, and other shells.

SEE ALSO

Copied to clipboard