Linux command to check VM is azure VM or amazon EC2 instance

Is there any linux command to check VM is azure VM or amazon EC2 instance ? If there help me on this .

Upvotes: 0

Views: 444

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269826

You could retrieve (curl) the Instance Metadata URL: 169.254.169.254

Both AWS and Azure use it, but they return different information.

Upvotes: 1

Related Questions