Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to get OS type for GCP VM using gcloud command

Command to get OS type of a GCP VM using gcloud command (without doing ssh).

 

1 3 2,100
3 REPLIES 3

Hi, 

you can do it with this:

 

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