Ubuntu 18.04 修复重启sysctl 失效

2024-08-10 416 0

如禁用ipv6

vim /etc/sysctl.d/99-sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
sysctl -p

修复重启失效

/etc/rc.local
#!/bin/bash
# /etc/rc.local

# Load kernel variables from /etc/sysctl.d
/etc/init.d/procps restart

exit 0
chmod 755 /etc/rc.local

相关文章

win11终端配置 ubuntu trzsz-go trz/tsz 上传/下载
UFW+IPSET 禁用非法IP
ip_local_port_range: prefer different parity for start/end values
Linux Sudo 权限配置
阿里云ECS云盘IOPS压测
nextcloud preview-generate 报错文件无权限解决

发布评论