【Linux】limits.conf 不重启就生效或者不生效的原因

前阵子,我要用到使LInux的文件打开数为65534个,而且需要永久生效,于是将配置写到了:

vim /etc/security/limits.conf

* soft nofile 65534
* hard nofile 65534

重新登录后limit.conf的配置都不生效,后来发现,ubuntu有个bug,root用户必须注明用户

root soft nofile 65534
root hard nofile 65534

也就是写成上面那样,重新登录,不需要重启,ulimit -a可以看到文件打开数已经是65534了,这就是limits.conf不生效的原因,注意ubuntu一定不能直接用*
---------------------
作者:xxxxxx91116
来源:CSDN
原文:https://blog.csdn.net/xxxxxx91116/article/details/17136299
版权声明:本文为博主原创文章,转载请附上博文链接!

原文地址:https://www.cnblogs.com/ExMan/p/11208226.html