zl程序教程

您现在的位置是:首页 >  系统

当前栏目

ubuntu修改 ulimit -c unlimit

Ubuntu 修改 ulimit
2023-09-14 09:08:24 时间

1> 修改配置文件
sudo vim /etc/security/limits.conf
添加:

root    soft    nofile  65535
root    hard    nofile  65535
root    soft    noproc  65535
root    hard    noproc  65535

 

在这里插入图片描述
非root用户需再另行配置:
sudo vim /etc/systemd/system.conf
修改:

DefaultLimitNOFILE=65535

在这里插入图片描述
2> 重启

3> 查询结果
ulimit -n

配置项说明:
root: 配置的目标用户
soft: 软限制
hard: 硬限制
nofile: 文件描述符限制
noproc: 进程数限制