On Linux you have to simply install the qemu-guest-agent, please refer to the documentation of your system.
We show here the commands for Debian/Ubuntu and Redhat based systems:
on Debian/Ubuntu based systems (with apt-get) run:
sudo apt-get install qemu-guest-agent -y
and on Redhat based systems (with yum):
sudo yum install qemu-guest-agent
Depending on the distribution, the guest agent might not start automatically after the installation.
Start it either directly with
sudo systemctl start qemu-guest-agent
(should work for most distributions) or reboot the guest.