欢迎来到程序员中文网!

首页 Linux Mysql C++ Python PHP JavaScript 资源下载 动态 开源推荐
我要投稿 投诉建议

ulimit 资源限制

时间:2026年08月12日 05:16:04 浏览:2

ulimit 资源限制


ulimit 可以限制用户进程的资源使用(如打开文件数、内存等)。


示例


# 查看当前限制
ulimit -a

# 设置最大打开文件数(软限制)
ulimit -n 65535

# 设置硬限制(需 root)
ulimit -Hn 65535

永久配置:编辑 /etc/security/limits.conf


* soft nofile 65535
* hard nofile 65535