centos7-禁用ipv6及添加window引导

1.禁用ipv6

命令行:]# ifconfig

若显示有inet6…“address”… 说明ipv6在使用

命令行:]# vim /etc/default/grub
在GRUB_CMDLINE_LINUX=“crashkernel=auto rhgb quiet” 行中加入ipv.disable=1
即:GRUB_CMDLINE_LINUX=“crashkernel=auto rhgb quiet ipv6.disable=1”

2.添加windows引导

命令行:]# vim /etc/grub.d/40_custom
添加:
menuentry “windowsXX”{
insmod ntfs
set root=(hd0,1)
chainloader +1
}
#此命令也可在/boot/grub2/grub.cfg中添加,但系统grub2刷新时将删除掉;
#在grub2中分区是以1开头,grub中则以0为起始分区;hd0,即为第一块硬盘,以此类推;

3.将#1#2保存导入grub.cfg中

命令行:]# grub2-mkconfig -o /boot/grub2/grub.cfg
#将前面1和2修改内容刷入grub2启动配置文件grub.cfg中;

参考:
[1].https://linux.cn/article-5417-1.html

猜你喜欢

转载自blog.csdn.net/weixin_40948696/article/details/82952305
今日推荐