ubuntu修改mac

臨時修改

  1. 先停用網卡 
  2. ifconfig eth0 down 
  3. 修改網卡地址 
  4. ifconfig eth0 hw ether **:**:**:**:**:** 
  5. 啓用網卡 
  6. ifconfig eth0 down

永久修改

  1. 直接編輯 /etc/network/interfaces 文件,在 iface eth0 inet static 後面添加一行: 
  2. pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx(要改成的MAC) 
  3. 編輯interfaces文件 
  4. sudo nano /etc/network/interfaces 
  5. 如下所示: 
  6. face eth0 inet static 
  7. pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx(要改成的MAC) 
  8. address 192.168.1.10 
  9. netmask 255.255.255.0 
  10. gateway 192.168.1.1 
  11. 重啓網卡 
  12. sudo /etc/init.d/networking restart 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章