基础贴:教你在Linux中更改MAC地址
环境
Centos7.7 Minimal
GNU MAC changer 1.7.0
[root@localhost ~]# ip link show
1: lo:mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens33:mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 00:0c:29:48:4c:9a brd ff:ff:ff:ff:ff:ff
安装macchanger
[root@localhost ~]# git clone https://github.com/alobbs/macchanger
[root@localhost ~]# yum -y install autoconf automake gcc gcc-c++ texinfo
如何使用macchanger
[root@localhost ~]# macchanger -r ens33
Current MAC: 00:0c:29:48:4c:9a (VMware, Inc.)
Permanent MAC: 00:0c:29:48:4c:9a (VMware, Inc.)
New MAC: a2:97:a2:55:53:be (unknown)
[root@localhost ~]# ip link show ens33
2: ens33:mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether a2:97:a2:55:53:be brd ff:ff:ff:ff:ff:ff
[root@localhost ~]# macchanger --mac=XX:XX:XX:XX:XX:XX
[root@localhost ~]# macchanger -p ens33
Current MAC: a2:97:a2:55:53:be (unknown)
Permanent MAC: 00:0c:29:48:4c:9a (VMware, Inc.)
New MAC: 00:0c:29:48:4c:9a (VMware, Inc.)
总结
希望本篇可以帮助到大家~
如果喜欢这位作者的文章,点点在看支持一下~
官方站点:www.linuxprobe.com
Linux命令大全:www.linuxcool.com
Linux系统下载站:www.linuxdown.com
刘遄老师QQ:5604922
Linux技术交流群:193666693
(新群,火热加群中……)
书籍在线学习(电脑阅读效果佳):
http://www.linuxprobe.com/chapter-00.html
想要学习Linux系统的读者可以点击"阅读原文"按钮来了解书籍《Linux就该这么学》,同时也非常适合专业的运维人员阅读,成为辅助您工作的高价值工具书!