ubuntu中修改网卡MAC

Ubuntu每日小技巧:

临时修改
/sbin/ifconfig eth0 down
/sbin/ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
/sbin/ifconfig eht0 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

Tags: ubuntu, 网卡mac

只显示5条记录相关文章

发表评论

评论内容 (必填):