在 Ubuntu Mate 16.04.4LTS 中,每次运行命令时:
$ ulimit -a
我得到:
open files (-n) 1024
我试图在/etc/security/limits.conf 添加命令来增加此限制:
myusername hard nofile 100000
但如果我运行 ulimit -a,这个值 1024 仍然存在并不重要。修改后重启系统,问题依旧。 另外,如果我运行
ulimit -n 100000
我收到回复:
ulimit: open files: cannot modify limit: Operation not permitted
如果我跑
sudo ulimit -n 100000
我得到:
sudo: ulimit: command not found
关于如何增加该限制的任何想法?
谢谢
最佳答案
从ulimit
下的man bash
:
-n The maximum number of open file descriptors (most systems do not allow this value to be set)
也许您的问题只是您的系统不支持修改此限制?
关于linux - 增加同时打开的文件数。 Ubuntu 16.04.4 长期支持版,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49677451/