Change your MAC address in Linux (Ubuntu)

Relevant to your use, you can either choose to make it a permanent addition or a temporary addition. Lets take an example of changing the MAC address of interface eth0 to 11:22:33:44:44:66

Temporary Addition

$ sudo ifconfig eth0 down

$ sudo ifconfig eth0 hw ether 11:22:33:44:55:66

$ sudo ifconfig eth0 up

Permanent Addition

1. Open /etc/network/interfaces ,

$ sudo vim /etc/network/interfaces

2. Add an extra line to specify the new MAC

auto eth0

iface eth0 inet dhcp

hwaddress ether 01:02:03:04:05:06

(A simple configuration, additional configurations will require additions/alterations. E.g. static IP/different interface)

3. Restart the network service

$ /etc/init.d/networking restart

Though the the latest version of Ubuntu may require you to use the service command to start/stop/restart services

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s