mercredi 26 janvier 2011

how to change your mac address in Ubuntu

1: Temporary Modification:
Step 1: check your Mac address.


sudo inconfig


and then, you will see the following lines in your terminal:



eth0      Link encap:Ethernet  HWaddr 00:16:41:e5:7f:1d  
          inet addr:192.168.1.50  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::216:41ff:fee5:7f1d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:92 errors:0 dropped:0 overruns:0 frame:0
          TX packets:92 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:14966 (14.9 KB)  TX bytes:11325 (11.3 KB)
          Memory:ee000000-ee020000 
lo        Link encap:Local Loopback
...


In this case, your mac address is 00:16:41:e5:7f:1d.


Step 2: Set the Mac address as you wish.


sudo ifconfig eth0 hw ether 00:00:00:00:01:01


Of course, you can use other mac address you want here. Then, enter your password. Afterwards, check the Mac address again, you will see the following in your terminal:



chen@chen-IBM-UBUNTU:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:00:00:00:01:01  
          inet addr:192.168.1.50  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::216:41ff:fee5:7f1d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4150 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3660 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:4323076 (4.3 MB)  TX bytes:758494 (758.4 KB)
          Memory:ee000000-ee020000 


lo        Link encap:Local Loopback  


To reset/restore your Mac address, you can restart your machine and login again.
DONE.


Aucun commentaire:

Enregistrer un commentaire