[root@localhost ~]# more /etc/rc.local //我在网上搜到的,把那个ifup命令加了进去
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
ifup eth0
重启后就网卡就自动激活了
虚拟机bridge模式下每次启动都需要重新激活网卡
最新推荐文章于 2021-07-21 21:38:01 发布