Change MAC Address in Ubuntu

Posted in Quick Tips | 54 comments
Tags: , ,

Change mac address in UbuntuSometimes it is just necessary to change MAC address (also known as ethernet address, physical/arp/hardware address or even hwaddr) of network interface in Ubuntu. It is far out of this post’s scope to list here all possible reasons of doing it so I just listed below several ways to change MAC address under Ubuntu Linux. All of those ways require typing commands in terminal so open it in in Ubuntu menu.

In order to see all interfaces detected by your Ubuntu as well as their MAC addresses and hardware names type the following command:

sudo ip addr

Here is sample output:

1: lo:  mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 4c:22:d0:b8:78:ae brd ff:ff:ff:ff:ff:ff
3: wlan0:  mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:19:7e:53:8c:a3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.18/24 brd 192.168.1.255 scope global wlan0
    inet6 fe80::219:7eff:fe53:8ca3/64 scope link
       valid_lft forever preferred_lft forever

It shows three interfaces: lo, eth0 and wlan0 (these are hardware names of them). MAC or hardware address is shown in link/ether line, e.g. current MAC address of eth0 is 4c:22:d0:b8:78:ae.

Change MAC address in Ubuntu using ifconfig

sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 4c:22:d0:b8:78:ae
sudo ifconfig eth0 up

Where eth0 is hardware name if the interface and 4c:22:d0:b8:78:ae is desired MAC address for it.

Macchanger console utility

Install macchanger using command:

sudo aptitude install macchanger

Installed application makes it possible not only to change MAC address to defined one but also makes it possible:

  • Change MAC to random value
  • Apply MAC from list of vendors

For example to change MAC address of the interface to hardware address belonging to Linksys you can do the following:

macchanger --list=linksys

It will show that Linksys MAC addresses start with 00:0f:66. Now change MAC address of the interface:

sudo ifconfig eth0 down
sudo macchanger -m 00:0f:66:4e:16:88 eth0
sudo ifconfig eth0 up

You will see the following output in case of successful change of MAC address:

Current MAC: 4c:22:d0:b8:78:ae (unknown)
Faked MAC:   00:0f:66:4e:16:88 (Cisco-linksys)

Please notice that above mentioned ways to change MAC address in Ubuntu implies that normal hardware address will be restored once you rebooted.

Follow @Ubuntuka on Twitter!
RSSComments

Change MAC Address in Ubuntu | TurboLinux Blog

Posted on August 18, 2011 at 12:12 pm

[...] Here is a excellent tutorial show you how to Change MAC Address in Ubuntu: Change MAC address in Ubuntu using ifconfig [...]

goodboy

Posted on August 30, 2011 at 2:15 pm

thnxxx that was really helpful

anonymous

Posted on December 21, 2011 at 11:43 pm

The problem, at least with wifi, is that network manager changes my mac address back to the original when it connects to my AP. Have you experienced this or know how to resolve it?

Ben

Posted on January 19, 2012 at 9:18 pm

thanks!

Andrew

Posted on February 10, 2012 at 11:52 pm

I'm trying to change MAC on my wlan0 but it just doesn't work properly. My MAC stays the same.
sudo apt-get install macchanger macchanger-gtk
sudo ifconfig wlan0 down
sudo macchanger -r wlan0
sudo ifconfig wlan0 up

I tried changing it in GUI but still no effect. When ever I type
ifconfig
I see my original MAC
I also checked it with Fing which is an app for Android phone, it shows you all connected devices to network, their IPs and MACs.
Unfortunately I can't get access to my route UI 'cos it's password protected.

Any ideas why it's not working?

Andrew

Posted on February 10, 2012 at 11:55 pm

I'm on Ubuntu 10.10

Cliff

Posted on February 13, 2012 at 7:24 pm

I had to pkill NetworkManager on mine. Here is the script I used, on Ubuntu 10.10, but it doesn't seem to work on 9.10

#!/bin/bash
mac=00:0d:${RANDOM:1:1}${RANDOM:1:1}:${RANDOM:1:1}${RANDOM:1:1}:${RANDOM:1:1}${RANDOM:1:1}:${RANDOM:1:1}${RANDOM:1:1}
echo $mac
#exit
sudo pkill NetworkManager
ifconfig wlan0 | grep HWaddr
sleep 3
sudo ifconfig wlan0 down
#ifconfig wlan0 hw ether 00:12:43:57:99:01
sleep 3
sudo ifconfig wlan0 hw ether $mac
sudo ifconfig wlan0 up
sleep 3
sudo ifconfig wlan0 hw ether $mac
ifconfig wlan0 | grep HWaddr
#modprobe ndiswrapper
sudo NetworkManager

Cliff

Posted on February 13, 2012 at 7:29 pm

oh yea, the official way to stop NetworkManager is:
sudo service network-manager stop
replace stop with start to start it
I haven't tested it this way though

burseperi

Posted on May 17, 2012 at 12:38 pm

This is Best Translation Services where I usually make my translate french to english . It can be useful you use it.

document translation services

Bigrey

Posted on June 18, 2012 at 1:01 pm

ok people with wi-fi wanting to change their wlan0 mac adress and have problems with the Mac getting back to the original when trying to connect. here's what you do

sudo service network-manager stop
sudo ifconfig wlan0 down
sudo macchanger -r wlan0 (or ''hw ether'' instead of -r to put your personalised MAC)
sudo ifconfig wlan0 up
sudo service network-manager start
now you should be good

Chuck

Posted on July 5, 2012 at 1:39 am

Thank You Bigrey!
Didn't have to stop the network on my old card.

mukund

Posted on July 26, 2012 at 2:30 pm

Thankx for helping… just a question more….. what about our wifi then?

Adam

Posted on November 2, 2012 at 6:28 am

Does it work in all Linux,or just Ubuntu? Am looking for MAC address change method for all Linux.

Gail

Posted on November 19, 2012 at 12:51 am

Glad to visit your blog, I look forward to more good articles and I think we all like to thank so many good articles, blog to share with us.

Honey

Posted on November 19, 2012 at 8:01 am

Hallo Dömitz….wir das heisst die band Fünf vor 12 wollten uns auf diesem wegefür den tollen Abend bei der Dömitzer Musiknacht bei euch bedanken.Ihr seid ein super tolles Publikum gewesen,und habt richtig gute stimmung gemachtecht tolle leute

Bess

Posted on November 19, 2012 at 8:02 am

Danke Euch allen! Und hoffentlich bis bald!

Fanny

Posted on November 19, 2012 at 8:02 am

Mit so einem tollen Publikum wie Euch gibt es bestimmt noch einige schöne Musiknächte in Dömitz, und wenn Ihr wollt, sind wir auch wieder gern mal mit dabei!

Betty

Posted on November 19, 2012 at 8:03 am

interesting site! I'm really like it! Very, very good!

Dale

Posted on November 19, 2012 at 8:04 am

Really like this page, and do well. I will let you all know it, so that more people visit

star

Posted on November 19, 2012 at 8:05 am

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing ability has inspired me.

Elsie

Posted on November 27, 2012 at 12:22 am

Hallo Dömitz….wir das heisst die band Fünf vor 12 wollten uns auf diesem wegefür den tollen Abend bei der Dömitzer Musiknacht bei euch bedanken.Ihr seid ein super tolles Publikum gewesen,und habt richtig gute stimmung gemachtecht tolle leute

Cara

Posted on November 27, 2012 at 12:23 am

Thank you for sharing!Very much like we left a deep impression, and will always come.

370seo

Posted on December 10, 2012 at 11:41 am

Thank you for sharing!Very much like we left a deep impression, and will always come.

Steve

Posted on December 11, 2012 at 10:50 pm

Ok, I found this thread in search for some hope to change my MAC address cause I thought I was getting blocked at the library for downloading movies. I went threw the steps an did everything that was suggested an now I have no network at all, when I reboot I get a message that says the system is waiting for the network configuration. Then the os finally boots and I have not network, no icon, not nothing as if my wifi and Ethernet hooked up and rode off into the sunset. Any help? Please! Also I’m a super noob so I obviously don’t know what I’m doing. Thanks

healthy food recipes

Posted on December 21, 2012 at 2:39 pm

Hi there! I could have sworn I've been to this web site before but after going through some of the posts I realized it's new to me. Anyways, I'm definitely delighted I found it and I'll be book-marking it and checking back often!

ice machine

Posted on December 25, 2012 at 5:58 am

what you share in this article is wonderful .I like it so much.

The Barry Law Group

Posted on December 26, 2012 at 3:53 pm

So this is that type of easy.I was not known this. I am gonna try this.

noseman Cahill

Posted on January 12, 2013 at 6:35 pm

Fantastic site. Lots of helpful info here. I am sending it to some pals ans additionally sharing in delicious. And certainly, thanks for your effort!

comtrweb

Posted on January 30, 2013 at 2:41 pm

Fantastic site. Lots of helpful info here. I am sending it to some pals ans additionally sharing in delicious. And certainly, thanks for your effort!

seo optimizasyonu!

Gelinlik
SEO

Computer Support

Posted on February 7, 2013 at 9:43 pm

The funny thing is I've actually had a client ask us how to do this? Very helpful.

Luke

Posted on March 2, 2013 at 3:42 pm

Hello Sir good article i really love it i have reading this article is awesome so good work keep working.Professional Essay Help

click here

Posted on March 4, 2013 at 8:22 am

Love these… bought both nude and black! Not a ton if grip on the bottom so may buy the pads you can stick on so I don't fall on my face

business records

Posted on March 4, 2013 at 4:40 pm

Hello, i think that i saw you visited my weblog so i came to
“return the favor”.I am attempting to find things to enhance my
website!I suppose its ok to use some of your ideas!
!

Zile

Posted on March 5, 2013 at 3:55 am

Its really a nice information where to change a mac address i think its like IP address where in the above lines i am getting a same felling but without Education and Reference you cannot do this.

writing blog

Posted on March 6, 2013 at 4:45 am

Thank you very much for posting and sharing this great article. It is so interesting. I want to know some other information about this site. So please give me this news quickly. I always will be aware of you
writers blog<a/>

Michael Wolfson

Posted on March 7, 2013 at 6:53 pm

I surprised with the analysis you made to make this particular publish incredible.

research proposal

Posted on March 11, 2013 at 5:47 pm

I admire the way you brought out the general essence of your topic. Thanks for this blog.

replica watches

Posted on March 25, 2013 at 5:21 am

After see your blog, I am agree with your thoughts, and hope you can share more of the information to us, and i will see your blog update often . or you may like us to .

Abercrombie Paris

Posted on April 4, 2013 at 6:52 pm

The more we can trust that with every ending is a new beginning, the less likely we are to resist letting go of the old. We play a part in choosing what the new beginning will be. We do not need to rush into anything. Af polos wholesale consist of polo shirts that are quite popular because they offer casual as well as formal styling for the user. Dealers who are interested in getting variety of products to sell them in retail sector should buy wholesale af shorts that would help them in getting huge discounts at bargain prices from our company. You can wear Abercrombie polos with jeans to look good and stylish.

Kama

Posted on April 6, 2013 at 2:52 am

The Photo Expo sounds like a great time! : D

Kimberley

Posted on April 6, 2013 at 2:52 am

This is my first visit to your site. Today I have got a new site. I am really happy to be here. I am stay tuned here for your next blog…

Thera

Posted on April 6, 2013 at 2:54 am

You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!

Abercrombie and Fitch

Posted on April 7, 2013 at 10:19 am

What does it get to dress well? Having tons of money? Nicely, that aids but most of all it takes organization, knowing oneself and your physique and taking the time to get it correct. Becoming nicely dressed is not about putting on the newest fashions it is about knowing your self and the designs that look best on you irrespective of the newest developments. Maintaining up with the most recent trends is not only time consuming and costly but difficult function.

Abercrombie

Posted on April 7, 2013 at 10:21 am

abercrombie and fitch sale perhaps only really be seen in the movie

Günstigste abercrombie Website

Posted on April 7, 2013 at 10:21 am

what’s happening to britney?It seems Britney Spears, 22, keeps making headlines, but never for the right reasons. First, it seems she fell for a radio hoax in Dublin, Ireland, when DJ Jim Nugent called her up, pretended he was Colin Farrell and told her he publicly rated her sex skills as eight out of 10. She seemed confused..

Hollister Madrid

Posted on April 7, 2013 at 10:21 am

abercrombie and fitch sale the drivers installed are the newest available from there website

comtrcom

Posted on April 17, 2013 at 3:22 pm

Hosting
Oktilyon, Hosting, Kiralık Sunucu, VDS Server, Linux Hosting, Windows Hosting

comtrcom

Posted on April 17, 2013 at 3:23 pm

Eticaret
Eticaret, Eticaret Siteleri, Eticaret Sistemleri, Eticaret Tasarım, Eticaret paketi, Eticaret seo, SEO, Comtr Eticaret, Eticaret teknikleri

Dame Nike Free Run

Posted on April 18, 2013 at 1:50 am

To get best seo tips for improvement in your websites natural traffic and rank, Please visit us and find tips or let us do something for you. Thank You

Nike Zapatos Fútbol

Posted on April 18, 2013 at 1:51 am

Wonderful post. I appreciate your attention to this subject and I learned a good deal

Anonymous

Posted on April 26, 2013 at 5:25 am

Hey there! This is my first comment here so I just
wanted to give a quick shout out and tell you I really enjoy reading through your posts.
Can you recommend any other blogs/websites/forums
that go over the same topics? Thanks a lot!

24pix.ru

Posted on May 12, 2013 at 5:53 am

The mechanism of action behind green Weight Loss Pills For

Men. One of the most popular ingredients used in the pills.

Therefore, they do not go through a weight loss pill provides

two varied means of diet supplementation as it enhances your metabolism along with repressing your appetite.

Villa Turkey

Posted on May 16, 2013 at 12:31 pm

Villa Turkey

tabdig.org

Posted on May 18, 2013 at 2:23 pm

Outstanding post but I was wondering if you could write a litte
more on this topic? I’d be very grateful if you could elaborate a little bit more. Bless you!

Post a comment

Hello guest, care to post a comment?