Command to get OS type of a GCP VM using gcloud command (without doing ssh).
1 Like
Hi,
you can do it with this:
https://cloud.google.com/compute/docs/instances/view-os-details#view-data-tool
using OS Inventory from VM Manager.
1 Like
if VM Manager is not enabled in the specific project , will gcloud command will work in that case to get os detail?
If not using Vm Manager you can get closer to that with this:
gcloud compute instances describe instance-name | grep licenses
In that output string you can deduce what OS is used in the VM