[Linux] Change MAC Address in Ubuntu 9.10!

Today I will show you how to change MAC address for your network card , this includes your wireless card , Ethernet card .... or any card you want!

Time needed : 5 min.
Difficulty : Easy!

Changing MAC Address !

1. Go to Terminal (Applications>Accessories>Terminal).

2. Log on as root by typing :
  • sudo -s

3. Type "ifconfig" to see what type of network cards do you have , usually eth0 refers to Ethernet card , and wlan0 refers to wireless card .
  • ifconfig
note: "eth0" , "0" here is a zero not a letter O ! and notice that my MAC address for eth0 device is written next to HWaddr .

4. We have to turn off our connection first using this command , in this example I will use "eth0" wireless connection , you can change it to whatever connection you want , wlan0,ath0....
  • ifconfig eth0 down

5. now we will use " hw ether " command which will change our MAC address, type:
  • ifconfig eth0 hw ether 02:01:08:05:04:02
note : change 02:01:08:05:04:02 to whatever number you want
for example
00:1F:3C:1C:C4:6D:31 .... , be careful some MAC may
not be accepted , keep trying!

6. Start your network device again, type:
  • ifconfig eth0 up

7. To make sure that changing is successful , type :
  • ifconfig

yup! it changed! that's it!

Note: After rebooting your system , your MAC address will changed to
the original one.

See Also in Mohammed SuperTech

Read Users' Comments (5)

5 Response to "[Linux] Change MAC Address in Ubuntu 9.10!"

  1. za3tar says:
    April 8, 2010 at 2:33 AM

    Why would you do "sudo su" ?! That seems to defeat the purpose :-)
    I think "su" by itself or "sudo -s" by itself should do the work

  2. Dr.Mohammed says:
    April 8, 2010 at 4:21 AM

    hmm...wise question indeed!

    actually there is some talk about higher privilege access when you are using "sudo su" command , and especially if you are working with servers, its not that common expression , but if you read some Linux articles you will see it there ,

    but you are right , there is no point here to use "sudo su" its meaningless! using either "sudo" or "su" will do the function , of course there is difference between these two commands.

    thanks for passing by , and i will change my post , thanks.

  3. Anonymous Says:
    September 14, 2010 at 12:13 PM

    How can u change ur wireless mac address on linux 10.04??

  4. Dr.Mohammed says:
    September 15, 2010 at 8:57 PM

    @ Anonymous

    This technique works in all Linux distribution including 10.04 , you can check this article too .


  5. sayman says:
    July 6, 2011 at 12:14 PM

    ey i am a totally new user in backtrack4 .

    now i am running backtrack4 for in vmware.

    i am running windows Xp as a host.

    i cannot connect my backtrack4 through bridge connection in vmware.

    i am able to connect this with "NAT" connection in vmware.but in NAT connection i face many problem.
    so i need a bridge connection.

    here is my ip address configuration

    ip address is:

    subnet mask:

    default gatteway:

    peferred DNS server:

    alternate DNS server:

    mac address:00b0273784ad

    in windows if i not use my mac address.I have no connectivity.

    please tell me how to put this ip address in backtrack4

    very argent

Post a Comment