Display the per-process open-file-descriptor limit inherited by the current Bash and child processes.
Which command is appropriate?
Bash builtin ulimit -n displays the current open-file-descriptor limit.
Detailed explanation
ulimit -nCorrect. -n selects the open-file limit.
ulimit -uIncorrect. -u selects maximum user processes.
ulimit -vIncorrect. -v selects virtual memory.
ulimit -cIncorrect. -c selects core-dump size.
Try it yourself
An example you can run in a temporary verification environment.
bash -c 'ulimit -n'Expected result
現在のopen file descriptor上限を表す整数Key points
- -n is open files
- No value means display
- Inherited by child processes
Notes
- Environment: Bash 5.x / limit参照のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Permission bit
A mode bit controlling read, write, execute, or special execution behavior.
Account state
Attributes that determine whether a password or login account can be used.
Resource limit
A per-process or per-user ceiling such as open files or process count.