how to change mac address kali linux

C++
ifconfig eth0(whatever the interface name is ) down
ifocnfig eth0 hw ether 00:11:22:33:44:55
ifconfig eht0 up
$ sudo ifconfig [interface] down
$ sudo ifconfig [interface] hw ether [new MAC Address (needs to start with 00)]
$ sudo ifconfig [interface] up
Source

Also in C++: