Ubuntu 设置 ulimit 是不是“*”不起作用?

2023-03-17 07:31:52 +08:00
 kisshere

Ubuntu 想设置 ulimit 为 65535 , 编辑 /etc/security/limits.conf

* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535

保存后,发现根本不生效,但是把星号换成具体用户如 root 、www 等保存后,ulimit 变为 65535 了

所以 Ubuntu 根本不支持“*”号?如果要设置对所有用户 ulimit 都为 65535 ,该怎么设定?

974 次点击
所在节点    程序员
2 条回复
unnamedhao
2023-03-17 09:23:26 +08:00
好像 root 不支持*
xin053
2023-03-17 09:49:58 +08:00
* 不包含 root ,root 要单独指定
* - nofile 65535
* - nproc 65535
root - nofile 65535
root - nproc 65535

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/924708

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX