Ubuntu 18.04 修改 MAC 地址(临时)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/shida_csdn/article/details/83413458

一、设置步骤

       注意替换 以下命令中的 ens160 为你的实际网卡名称

# ifconfig ens160 down                                                            # 首先停止相应网卡

# ifconfig ens160 hw ether 02:42:80:63:2e:54                         # 设置 mac 地址

# ifconfig ens160 up                                                                 # 启动网卡设备

 二、生成随机的 MAC 地址

# echo "00$(dd bs=1 count=5 if=/dev/random 2>/dev/null |hexdump -v -e '/1 ":%02X"')"

        

猜你喜欢

转载自blog.csdn.net/shida_csdn/article/details/83413458