Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I'm trying to increase the number open file handles on a server of mine and the usual places don't seem to be taking effect:

root@dev:~# sysctl -p |grep file
fs.file-max = 200000

root@dev:~# grep nofile /etc/security/limits.conf
*       soft    nofile  400000
*       hard    nofile  1000000

root@dev:~# ulimit -n

I wish to increase the root user's file count to a much larger count that 1,024 (e.g. 200k or higher) but as you can see from the output, something is blocking me. I know I can use ulimit on the CLI but I want the setting to be persistent & apply automatically.

What other locations might be affecting the user's file limit? Am I missing a command to apply these settings permanently?

(Running Ubuntu Hardy 8.04.4 LTS.)

share|improve this question
up vote 2 down vote accepted

The ulimit can be set from the .profile and .bashrc, etc files, so you can add

ulimit -n <number>

to any one of the following files:


as well as any other shell script these files call.

share|improve this answer
While this didn't fix my problem, it is a good answer. It's been long enough without any other responses so you win :) – Mark McDonald Aug 8 '12 at 5:53

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.