Functions: changing the mac address and hostname for each boot.
Tip: Run the command as root user. The example code is on debian.
The macchanger (a.k.a., the GNU MAC Changer) provides a variety of features such as changing the address to match a certain vendor or completely randomizing it.
Install the package macchanger from the official repositories.
apt update apt install macchanger
Display available network interfaces.
Change the mac address:
macchanger -r your_interface_name
Use the NetworkManager to configure MAC address randomization.
Creat a file.
Make it executable.
chmod +x /usr/bin/newhostname
Make it run at startup:
Now you can reboot to test the functions.