Start macchanger service: A guide
This article is original, reproduced please indicate the source
Installation
shell
apt install macchanger
Start up
Option One
Start automatically
First use the ifconfig
command to confirm your network card, then create and edit the following files
txt
[Unit]
Description=Macchanger Startup
Wants=network.target
After=network.target
[Service]
ExecStart=/usr/bin/macchanger -r YOURNETWORKCARD
Type=oneshot
[Install]
WantedBy=default.target
shell
sudo systemctl start macchanger.service
sudo systemctl enable macchanger.service
Option Two
Need to start manually
First write the shell file
shell
#!/bin/bash
ifconfig NETWORKCARD down // [!code focus]
macchanger -r NETWORKCARD // [!code focus]
ifconfig NETWORKCARD up // [!code focus]
exit 0
then start this shell
shell
chmod + x macchanger.sh
sudo bash macchanger.sh
Related commands
shell
macchanger -s eth0 # Display MAC information for network interface eth0
macchanger -r eth0 # Assign a random MAC address to eth0
macchanger -m b2:aa:0e:56:ed:f7 eth0 # Assign a fixed MAC address of b2:aa:0e:56:ed:f7 to eth0
macchanger -l # List MAC prefixes for major vendors
macchanger -m 00:1a:76 eth0 # Use a MAC address from Broadcom Corporation
macchanger -p eth0 # Restore the original MAC address
For other related commands, please see macchanger official page