Pages

Thursday, February 16, 2012

Changing Mac address in linux

Firstly, type

sudo ifconfig -a | grep HWaddr
 
to find the mac address of your system .ie, you will get the output as below :

eth0      Link encap:Ethernet  HWaddr b0:f3:29:68:a6:0c 

wlan0     Link encap:Ethernet  HWaddr 11:00:22:a3:g4:20 



 where the eth0 is the address for wired lan and wlan0 for wireless ie wifi.
 Now to change the mac address, type the following

ifconfig eth0 down
 
ifconfig eth0 hw ether 11:20:48:BA:d1:30 
 
you can choose the mac id you want, i.e. 11:20:48:BA:d1:30
 
ifconfig eth0 up
 
ifconfig eth0 |grep HWaddr
 
Now the mac address is changed, but it is temporary one. If u reboot, you can see ur original mac id.
The mac address is burned into your lan and it can't be changed permanently. 


No comments:

Post a Comment