Change MAC address of network interface in Linux

Well, thankfully this is rather trivial task for Linux and you can change MAC address of your network adapter using a few CLI/console commands. Honestly speaking it is impossible to literally change MAC address as it’s loaded into firmware but you can configure Linux so it will transform old MAC to the new one the fly.

The commands are are below but before typing them let’s consider why one might need this. One of the simplest examples is here: you acquire IP address, gateway, DNS entries via DHCP server which is set up to give out your IP settings to your MAC address only so if you change [possibly broken] network adapter you will need to ask sysadmin to change DHCP server’s settings… If this looks familiar to you, just type the following commands with sudo prefix or under superuser/root:

ifconfig eth0 down
ifconfig eth0 hw ether 00:19:7e:53:8c:a3
ifconfig eth0 up

eth0 – is hardware name of your network interface, you can use ip link to see all available interfaces identified by your system.
00:19:7e:53:8c:a3 is new MAC address you’d like to apply to the NIC.

These commands should be added into startup scripts if you require them to appear after Linux system reboots. This works on any distribution like Fedora, Ubuntu, Debian, RedHat, Suse whatever.

 
 
» You might also be interested in the following articles:
Cisco GRE example setup
FAQ: How to change Duplex and/or Auto-Negotiation NIC settings in Linux?
Fedora Core remote installation howto
Quick shell change for user in Unix or Linux
Simple Firefox optimizations that really matter



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

5 Responses to “Change MAC address of network interface in Linux”


  1. 1 Bob73

    Also, the first page speaks of hisbodedus. ,

  2. 2 Barbara64

    I do think we have the greatest software platform for mobile devices out there. ,

  3. 3 No_limits92

    Such an approach would entail different avenues of regional cooperation, including fulfilling immediate needs in terms of rec- onciliation initiatives, awareness building of the role of youth-serving NGOs, and nurturing existing national youth institutions and networks. ,

  4. 4 Barbara22

    You can ask what type of assessments the school is planning on using and what kind of results the assessments could produce. ,

  5. 5 Hyder

    Excellent tips. I was trying to change my mac address in linux your tips solved my problem. Thank a lot

Leave a Reply




Friendly Sites:Who is behind Linux Screw?
GeekyBits³ | Bash Cures Cancer | OMG! Ubuntu!
My SysAd Blog | Web Upd8
ZEPY | Linux config Wiki | Planet Sysadmin
a non-geek's linux notes | Linux Today
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem N. (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››