修改mac地址主要有两种方法,临时和永久。
首先查看一下自己的网卡,ifconfig:
临时:
先用这个小工具生成随机的Mac地址:在线MAC地址生成器(有个bug,点进去之后先在“地址前缀”框点一下,然后再点击生成)
sudo ifdown eth0
sudo ifconfig eth0 hw ether 82:66:47:28:C2:11
sudo ifup eth0
service network restart
sudo /etc/init.d/networking restart
这种临时的一般重启电脑之后就变回原来的了。
永久:
打开网络配置文件:sudo nano /etc/network/interfaces
然后加入一句:pre-up ifconfig eth0 hw ether 82:66:47:28:C2:11
即:
|
1 2 3 4 5 6 7 8 9 10 |
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp pre-up ifconfig eth0 hw ether 82:66:47:28:C2:E1 |
然后重启下网卡即可:
sudo /etc/init.d/networking restart






最新评论
站长您好,亚马逊云咨询推广资源,望建立联系,可邮件,谢谢。
换友情链接吗?
看你的站做的挺不错的
恭喜!!太强了,硕博连读啊
雁过留毛,人过留名。
看不懂但大受震撼
每天都在战争,希望2026和平.
ZeroTier 看过多篇帖子,目前群辉、飞牛os、win11 、安卓、ubuntu ≥18.04 顺利通过,这篇相对于简单 实用、特来感谢 🙄