Brainf**k (1) Bugs (3) C (1) HTML (1) Install (3) Linux (27) Maths (1) Python (12) Raspberry Pi (4)

Saturday, 11 July 2015

How to change mac address on linux temporarily

Whats a MAC address?
A MAC address is a physical way of addressing your network card at a hardware level.

How to find out your MAC address?
Open up a terminal and run
ifconfig wlan0 | grep HWaddr 
Where I have wlan0 you would put your networking device.
My output:
wlan0     Link encap:Ethernet  HWaddr 8c:a9:82:6c:9b:da
As you can see my MAC address is 8c:a9:82:6c:9b:da.

How to change your MAC address temporarily?
Open up a terminal as root and run
ifconfig wlan0 down
ifconfig wlan0 hw ether 00:00:00:00:00:01
ifconfig wlan0 up

This will have changed your MAC address to 00:00:00:00:00:01.
To show this run ifconfig wlan0 | grep HWaddr
This change will not survive a reboot.