V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
kisshere
V2EX  ›  程序员

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

  •  
  •   kisshere · 2023-03-17 07:31:52 +08:00 · 958 次点击
    这是一个创建于 399 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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 ,该怎么设定?

    unnamedhao
        1
    unnamedhao  
       2023-03-17 09:23:26 +08:00
    好像 root 不支持*
    xin053
        2
    xin053  
       2023-03-17 09:49:58 +08:00
    * 不包含 root ,root 要单独指定
    * - nofile 65535
    * - nproc 65535
    root - nofile 65535
    root - nproc 65535
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2485 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:43 · PVG 23:43 · LAX 08:43 · JFK 11:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.