ipv6.disable=1
[[email protected] ~]# cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="resume=/dev/mapper/klas-swap rd.lvm.lv=klas/root rd.lvm.lv=klas/swap rhgb quiet crashkernel=1024M,high" GRUB_DISABLE_RECOVERY="true" GRUB_CMDLINE_LINUX="ipv6.disable=1"
修改grub2
grub2-mkconfig -o /boot/grub2/grub.cfg
重启主机,永久禁用ipv6
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/280890.html