Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my machine,

ulimit -n returns 2560

Given that -n returns

The maximum number of open file descriptors.

Does it mean that system won't allow more then 2560 open files to be out there at any given time?

If not, how can i find out what is a hard limit system imposes on open files?

share|improve this question
up vote 1 down vote accepted

File descriptors are created for pretty much everything (since everything in Linux is a file), from connecting to another computer over the internet to running most applications. The resource limit is for that particular point in time. Keep in mind that even after the resource isn't being used, it can take several cycles for the shell to clean them up. To see what your hard limit is set to try doing ulimit -H -n this will show you the hard limit, when you do ulimit -n it's effectively like running ulimit -S -n which shows the soft limit.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.