Linux Processes Cheat Sheet/Set shell resource limit

Cap the number of user processes for the current shell.

Section: Priority, Scheduling, and CPU Affinity

Set shell resource limit

bash
bash
ulimit -u 4096
Explanation

Cap the number of user processes for the current shell.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Priority, Scheduling, and CPU Affinity
Start command with lower priority
Run a command with a niceness offset.
OpenIn sheetbashsame section
Change process priority
Adjust niceness for an existing process.
OpenIn sheetbashsame section
Show real-time scheduler
Inspect real-time scheduling policy and priority.
OpenIn sheetbashsame section
Set SCHED_FIFO policy
Assign a real-time FIFO scheduler to a process.
OpenIn sheetbashsame section
Run command on selected CPUs
Pin a command to specific CPU cores.
OpenIn sheetbashsame section
Show or change affinity for PID
Inspect or update CPU affinity for an existing process.
OpenIn sheetbashsame section