#停止防火墙 selinux NetworkManger
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i s///g /etc/selinux/config
systemctl stop NetworkManager
systemctl disable NetworkManager
linux/Centos下以root权限临时修改MAC地址:原文:https://www.cnblogs.com/webnote/p/5748307.html
1)闭网卡设备
/sbin/ifconfig eth0 down
2)修改MAC地址
/sbin/ifconfig eth0 hw ether 新MAC地址
3)重启网卡
/sbin/ifconfig eth0 up
4)查看修改是否生效:
ifconfig eth0 | grep ether
# 永久修改
在linux/Centos环境下将修改后的MAC地址永久保存的正确的步骤如下:
#ifconfig eth0 down
#cd /etc/sysconfig/network-scripts
#vi ifcfg-eth0
修改其中的"HWADDR=xx:xx:xx:xx:xx:xx"为"MACADDR=xx:xx:xx:xx:xx:xx"
#ifconfig eth0 up
#service network start
注意:关键词HWADDR和MACADDR是有区别的。
最后附ifconfig命令格式:
|