临时修改:
ifconfig eth0 down
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
ifconfig eth0 up
或者
ip link set eth0 down
ip link set eth0 address xx:xx:xx:xx:xx:xx
in ling set eth0 up
永久修改:
可以将上面几行放入 /etc/rcS.d/rc.local 文件 ,rc.local中的bash命令在启动系统时会自动执行
或者
直接编辑 /etc/network/interfaces 文件
pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
摘自http://spiritfrog.iteye.com/blog/209847
仅作为个人记录知识之用
相关文章:
- Linux下修改网卡的mac地址 2021-12-16
- 在Win7下修改网卡MAC地址 2021-11-12
- ubuntu 1604 修改mac地址 2021-07-24
- Ubuntu修改IP地址和MAC地址 2021-12-02
- Linux:永久修改网卡的MAC地址 2021-11-22
- 修改VMware虚拟机网卡MAC地址 2021-12-16