linux修改網卡mac

作法:利用開機時載入檔案來修改mac 的方法。

1.登入root 後 ,產生/root/boot/mac檔案,並更改權限為755。
# mkdir /root/boot
# vi /root/boot/mac
___內容________________________________
#!/bin/bash
ifconfig eth0 down
ifconfig eth0 hw ether 005056000001
ifconfig eth0 up
______________________________________
#chmod 755 /root/boot/mac

2.修改開機載入此檔/etc/rc.d/rc.local,添加執行/root/boot/mac檔案即可。
# vi /etc/rc.d/rc.local
___內容________________________________
/root/boot/mac
______________________________________

最後重開機即可,記得 005056000001是mac位址,請務必要修改哦!

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS