INTERFACE=""
NEW_MAC=$(printf '02:%02x:%02x:%02x:%02x:%02x\n' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
sudo ip link set $INTERFACE down
sudo ip link set $INTERFACE address "$NEW_MAC"
sudo ip link set $INTERFACE up
Created
July 9, 2025 00:28
-
-
Save zoonderkins/b78597834f56c1f4f37d24bfee977f8e to your computer and use it in GitHub Desktop.
random-reset-mac-address
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment