How to find OS of an EC2 instance using AWS CLI

后端 未结 4 829
鱼传尺愫
鱼传尺愫 2020-12-10 07:49

How can you find out the OS running on an EC2 instance using AWS CLI.

The ec2 describe-instance command spits out a lot of information , but there is n

4条回答
  •  感动是毒
    2020-12-10 08:25

    Here's a quick way to list the Platform field, which at least distinguishes between Windows and Linux:

    aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId,Platform]' --output text
    i-78b4ef47  windows
    i-b8ae3386  windows
    i-9d3611a2  None
    i-1c57c651  windows
    i-a241ec91  None
    i-7d26b630  None
    

提交回复
热议问题