Please refer to these docs on how to install Azure VM agent on Linux: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-linux#installation
To install the Azure Virtual Machine Agent in offline mode: https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshooting/install-vm-agent-offline
To update the Azure Linux Agent on a VM: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/update-linux-agent