How do you change MAC Address?

Ever wanted to get a permanent solution for your mac address change? Most of you who use internet via LAN has this problem of setting the mac address from the commandline. You do it every single time 3/4 console commands to get the net ready to use in your Ubuntu. Now go make a file(macset) at your home with any texteditor where u’ll have the following lines. notice 22:11:2F:3B:C5:54 is the Mac address of your LAN. It will vary upon your ISP/local provider. Just write down your own mac there. now do
sudo chmod 0777 macset

on the file and when you turn on your pc

you just type

sudo ./macset

to run your file’s commands as shell script, et voila! :)

ifconfig eth0 down
ifconfig eth0 hw ether 22:11:2F:3B:C5:54
ifconfig eth0 up
/etc/init.d/networking restart

You can now check if your MAC has been set properly by applying the follwing command at command line

ifconfig | grep HWaddr

Also read this post

4 Comments »

  1. Nice post I think. How can I change MAC address in MAC (OS) and windows in command line?

    • Ghazi Lenin Said:

      Right now I dont use Windows anymore. But there is surely some commandline ways to do that. I’ll look for them when I get time.

      On Mac OS X I saw its very much like the Linux haven’t experienced it first hand yet.

    • lavluda Said:

      check http://www.mac-talks.com/2008/08/01/changing-mac-addres-of-your-ethernetlen-card/

  2. Mike Said:

    Just passing by. Btw, your website have great content!

    _________________________________


{ RSS feed for comments on this post} · { TrackBack URI }

Leave a Comment