Home » How to, Linux

How to Change Mac Address in Linux (Ubuntu/Kubuntu)

27 February 2009 4 Comments

Ubuntu/Kubuntu Tutorial.

Some times we require to change MAC address (Physical Address of network card).This can be temporarily or permanently. Here is a tutorial which illustrates changing  of MAC address in linux/ubuntu/kubuntu

To change the MAC address temporarily

Open terminal and type

ifconfig eth0 down

This command brings the network down 

Later type the following command.

ifconfig eth0 hw ether Your Mac Address

For example, it will be like

ifconfig eth0 hw ether 001B2F1359C3

Later bring the network up by the following command.

ifconfig eth0 up

Now type

dhclient

This DHCP protocol allows your computer to contact a central server which main- tains a list of IP addresses which will be assigned to you.

Now your connection should be up with a new MAC address

If you still find a problem with connection, Just repeat the process after taking the LAN wire connection

If you want to access internet with the new mac address all the time, it would be difficult to repeat the process every time after starting the system

So we need to edit /etc/init.d/bootmisc.sh

Anything in the file loads after the regular boot process.So we can repeat the temporary process here.

Open terminal and type

sudo gedit /etc/init.d/bootmisc.sh

On the bottom of the page, insert the following piece of code

killall dhclient
killall dhclient3
ifconfig eth0 down
ifconfig eth0 hw ether 001B2F1359C3
ifconfig eth0 up
/sbin/dhclient
/sbin/dhclient3

So putting this in the file will change the MAC address everytime the system starts.

Related posts:

  1. Change your Wallpapers Automatically with Wally

4 Comments »

  • Gangster89 said:

    Okay so a really super good friend of mine sent me a TP to this store. ,

  • Lishopins said:

    funny

    free

    videos

    funny

    videos

    game.

  • Derrick said:

    Perfect. http://www.techolar.com deserves an award.

  • arbise said:

    first of My apologies, the english language just isn’t my principal language. While seeing the webpage I have came across some kind of strange code everywhere in the page . like Error: Cannot modify header tag … etc. It is quite likely my browser though, simply I still previously had never time to upgrading so i’m continue to making use of google Chrome 2 but internet pages similar to as an example yahoo and google or even my own 1 cheap flights to cebu cause me not any trouble, therefore it is actually slightly odd.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>