Change network mac address using "ip" command
15,096
First run:
ip link show
This will list your network devices. Find the one you want to change. Next, run:
sudo ip link set dev <your device here> down
Then:
sudo ip link set dev <your device here> address <your new mac address>
Finally:
sudo ip link set dev <your device here> up
Related videos on Youtube
Author by
kimusan
Software developer by daytime, keyboard hacker by night time. Always om the lookout for new fun projects to work on.
Updated on September 18, 2022Comments
-
kimusan over 1 year
Usually I would be able to change my wifi mac address with the ifconfig command like :
ifconfig <iface> hw ether XX:XX:XX:XX:XX:XX
Ubuntu have however deprecated ifconfig in behalf of the "ip" command, so I was wondering if there is an way to get similar functionality using that command?
-
PerlDuck over 5 yearsThe question was explicitely about an alternative to
ifconfig
because Ubuntu has switched to theip
command. -
pbhj almost 5 years
ip -c a
is really handy as a first command, or justip a
which stands forip address
and gives you a slightly different display including IPv4 and IPv6 addresses. -
John Smith about 2 yearsWill this change persist after the reboot?