How to change my MAC address in Fedora Core

Date: July 31st, 2009
Author: Stefan Batanov

In the following tutorial you will learn how to change the MAC address of your Network Interface Card (NIC) under Fedora Core Linux distribution.

I have waited for a long time to write this tutorial but just few days back I had to do it myself. I have bought a new laptop and wanted to use it in the office. In the office network all IP addresses are given by a DHCP server and I had to wait the network administrator to allocate and IP for my laptop. Unfortunately as we it is middle of the summer he was on a vacation and I did not want to bother him to do it remotely. Besides I simply cheated the DHCP server that my MAC address is the same as on my other laptop.

Anyway the reasons why you will need to change might be different for everyone who came on this page so lets cut the useless information and get to the point.

The next two commands will do the trick but you might need root privileges to the Fedora core system. For the purposes of this tutorial we have used Fedora Core 10 but this will work on every Linux distribution.

  1. ifconfig eth0 down
  2. ifconfig eth0 hw ether 00:1E:37:D9:31:9F

If you want to be able to do these commands with a normal user not root you will need to edit have in your /etc/sysconfig/network-scripts/ifcfg-eth0 the following line

  1. USERCTL=yes

of course it eth0 is just an example. You can do it with any other interface you need. For example with wlan0.

You could add this shell script in /etc/init.d/ if you wish to have this MAC permanently changed with startup. To manage this on boot you need to run this command

chkconfig –add

  1. #!/bin/bash
  2. #
  3. # chkconfig: 2345 99 99
  5. ifconfig eth0 down
  6. ifconfig eth0 hw ether 00:1E:37:D9:31:9F
VN:F [1.9.18_1163]
Rating: 0.8/10 (10 votes cast)
How to change my MAC address in Fedora Core, 0.8 out of 10 based on 10 ratings

Leave a Reply