Use the Bash ulimit builtin to display the maximum number of user processes available to the current shell and its children.
Do not change the value.
Which command is appropriate?
ulimit -u displays the maximum number of processes available to the user. Omitting a value makes ulimit display the current limit.
Detailed explanation
ulimit -nIncorrect. -n is the open-file-descriptor limit.
Incorrect. -n is the open-file-descriptor limit.
ulimit -fIncorrect. -f is the maximum file size.
Incorrect. -f is the maximum file size.
ulimit -vIncorrect. -v is the virtual-memory limit.
Incorrect. -v is the virtual-memory limit.
ulimit -uCorrect. It displays the maximum user-process count.
Correct. It displays the maximum user-process count.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' '-u=max user processes' '-n=open files' '-f=file size' '-v=virtual memory'Expected result
-u=max user processes
-n=open files
-f=file size
-v=virtual memoryKey points
- -u is process count
- No value means display
- Applies to the shell and children
Notes
- Environment: Bash ulimitのoption対応表
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.