How to Use ifconfig to set MAC address in Linux, Unix, FreeBSD etc.
 

How to Use ifconfig to set MAC address in Linux, Unix, FreeBSD etc.

 

This post was last updated on November 10th, 2020 at 08:11 pm

Linux has a built-in command ifconfig that is used to configure wired network interfaces. In this article I am going to give the example commands to setup MAC address manually.

How to Setup MAC address using ifcofig:

Use the below commands in sequence to setup the MAC address on your Linux or Unix or BSD machine.
I am assuming eth0 is the ethernet link on your machine. You can use the below command to see all interfaces present on the machine:
ifconfig -a
Once you fogure out the actual interface name you can replace it with eth0 and proceed using the other commands.

ifconfig eth0 up
ifconfig eth0 192.168.0.3
ifconfig eth0 192.168.0.3 hw ether 00:99:27:90:B4:22
ifconfig eth0 down
ifconfig eth0 hw ether 00:99:27:90:B4:22
ifup eth0
Previous How to Make a Bootable USB
Next How to Copy a website content using wget command in Linux
 

About author

You might also like

Networking 0 Comments

Setting Routes in Linux

This post was last updated on November 3rd, 2020 at 06:03 pm(Static Routes Page: static-routes.html) These methods of changing the route table don’t last accross reboots. Listed below are methods

Networking 0 Comments

Manual NIC Setup

This post was last updated on June 3rd, 2020 at 04:16 pmManually setting up a network interface. This can come in handy if you need networking but don’t have any

Networking 0 Comments

How To Setup Network File System (NFS) In Linux?

This post was last updated on August 1st, 2020 at 09:37 pmNFS or Network file system is a distributed filesystem protocol. It allows a remote host to mount filesystem over

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply