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 

 

你可能感兴趣的:(linux,职场,mac,ubuntu,休闲)