Skip to content

Instantly share code, notes, and snippets.

@yamatt
Last active June 19, 2016 17:16
Show Gist options
  • Save yamatt/0c24fecf3f66afa5b08c0c8ad59c45b8 to your computer and use it in GitHub Desktop.
Save yamatt/0c24fecf3f66afa5b08c0c8ad59c45b8 to your computer and use it in GitHub Desktop.
Randomly assign yourself a new MAC at every boot for SystemD/Fedora3
  1. Place the random-mac.service file in to /etc/systemd/system

  2. Update the file so that wifidevicename is your WiFi device name, such as wlan0 or wlp1s0

  3. Give it permissions:

     chmod 644
     chown root:root
    
  4. Finally run:

     sudo systemctl enable random-mac.service
    
[Unit]
Description=Randomize MAC address
Before=NetworkManager.service
[Service]
Type=oneshot
ExecStart=/usr/bin/macchanger -A wifidevicename
ExecStop=/usr/bin/true
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment