ubuntu 永久修改Mac地址

来源:百度知道 编辑:UC知道 时间:2024/09/28 11:51:22
ubuntu下永久修改。
请写明具体的命令。
谢谢!!

首先必须关闭网卡设备,否则会报告系统忙,无法更改。
ifconfig eth0 down
修改 MAC 地址,这一步较 Windows 中的修改要简单。
ifconfig eth0 hw ether <MAC地址>
重新启用网卡

ifconfig eht0 up 如果计算机每次启动都要修改mac地址 修改你的源,并升级到最新的系统:
sudo gedit /etc/init.d/rc.local
增加
sudo /sbin/ifconfig eth0 down
sudo /sbin/ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE (你的MAC地址)
sudo /sbin/ifconfig eth0 up
到最后以后他就会每次启动计算机的时候自动修改网卡地址

/etc/network/interfaces
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.9
netmask 255.255.255.0
gateway 192.168.0.1
nameserver 210.82.5.1
nameserver 202.106.46.151
sudo ifdown eth0 // 禁用网卡
sudo ifup eth0 // 启动网卡
或者
sudo /etc/init.d/networking restart