编程笔记

lifelong learning & practice makes perfect

wsl2 ulimit

references

wsl 2 ,ulimit -n 65535 设置报错=>

ulimit: Permission denied when changing resource of type ‘Maximum number of open file descriptors’

修改 /etc/security/limits.conf 的配置,再su username切换到当前用户就会生效

1
2
3
4
5
#soft for enforcing the soft limits
#hard for enforcing hard limits
#<domain> <type> <item> <value>
* soft nofile 50000
* hard nofile 55555

欢迎关注我的其它发布渠道