Skip to content

Instantly share code, notes, and snippets.

@ediamin
Created December 1, 2013 09:55
Show Gist options
  • Save ediamin/7730671 to your computer and use it in GitHub Desktop.
Save ediamin/7730671 to your computer and use it in GitHub Desktop.
Ubuntu Mac Changer with BASH script
#!/bin/bash
# usage: save this script as mac.sh in your home folder. open a teminal and give following command
# bash +x mac.sh
eth=`nmcli d | grep eth | awk '{print $1}'`
mac='YOUR_MAC_ADDRESS'
sudo ifconfig $eth hw ether $mac
sudo service network-manager restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment