Menu Home

ubuntu修改MAC地址

OS: ubuntu 12.04

命令行方式

ifconfig eth0 down
ifconfig eth0 hw ether [00:00:00:00]
ifconfig eth0 up

修改系统文件方式

/etc/network/interfaces

iface eth0 inet static

pre-up ifconfig eth0 hw ether [00:00:00:00]

address 192.168.2.100
netmask 255.255.255.0
gateway 192.168.0.1