ulimit

Get and set resource limits for the current shell and child processes.

medium risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

ulimit controls resource limits (open files, processes, stack size, core dumps) for the shell and its children. Limits come in two types: soft (current limit, can be raised by user) and hard (maximum ceiling, only root can raise). Critical for high-connection services.

Common flags
FlagMeaning
-n --nofileMax open file descriptors
-u --nprocMax user processes
-s --stackStack size in KB
-c --coreMax core file size
-a --allPrint all current limits
-S --softShow/set soft limits
-H --hardShow/set hard limits
Examples
ulimit -aShow all current resource limits · explain & risk-check →
ulimit -n 65536Increase open file limit for this session · explain & risk-check →
ulimit -c unlimitedEnable core dumps for debugging · explain & risk-check →
cat /proc/1234/limitsCheck limits of a running process · explain & risk-check →
Pro tip

High-traffic services (nginx, node) need `nofile` set to 65536+ in /etc/security/limits.conf or systemd unit (LimitNOFILE=65536). Default of 1024 causes 'too many open files' at load.

Related
sysctl systemctl ps
Open the full explainer →More in System & Processes

Reference text is hand-written and may be incomplete — check man ulimit for your version. Test destructive commands on a non-production system first.