IMDS(1)

πŸ“¦ version 3.4.1, in alpine 3.24

πŸ’… IMDS(1) β€” general commands manual, but make it metadata ✨

okay so bestie, buckle up β€” this is imds, from the General Commands Manual section, and it is literally the tool that goes and asks the cloud "who am I??" and brings the answers back. let's get into it 🫢


🌸 NAME 🌸

imds β€” query instance metadata. that's it, that's the whole vibe: it queries the instance metadata. no cap.


✨ SYNOPSIS ✨

imds [-h|--help] { -e | +e | -E | +E | -A | +A | +n | +s | +t | @alias |
imds-path | -- imds-path ... } ...

πŸ¦‹ DESCRIPTION πŸ¦‹

so imds queries the instance metadata service that your current cloud provider is running. it loads all the cloud-specific metadata conventions from tiny-cloud's provider library, then prints whatever metadata values you asked for straight to standard output. slay.

arguments get processed from left to right, like, in order, okay? and the output control tokens can be mixed right in with your metadata queries in a single invocation β€” you don't have to do separate runs, which is iconic behavior honestly.


πŸ’… OPTIONS πŸ’…

  • -h, --help β€” shows a short usage summary and then dips. exit stage left.
  • -e β€” ignore errors from the metadata queries that come after this. be unbothered.
  • +e β€” goes back to the default: stop on query errors. back to being responsible 😭
  • -E β€” hide standard error from the arguments that come after.
  • +E β€” show standard error from subsequent arguments. heads up: by default only the final request error is shown.
  • -A β€” hide errors from intermediate request attempts. this is literally the default, it's giving "i don't want to see the mess."
  • +A β€” show errors from every request attempt. and note: this does not override -E β€” the standard error controls and the request-attempt controls are independent, they're two separate sliders bestie.
  • +n β€” write a newline to standard output.
  • +s β€” write a space to standard output.
  • +t β€” write a tab to standard output.
  • -- β€” stop interpreting options, aliases, and output control tokens. every argument after this is treated as a literal provider-specific metadata path. periodt, no more magical thinking ✨

πŸŽ€ ALIASES πŸŽ€

  • @hostname β€” print the instance hostname. main character energy.
  • @local-hostname β€” print the local hostname.
  • @ssh-keys β€” print the SSH public keys associated with the instance.
  • @userdata β€” print instance user data.
  • @nics β€” print the provider-specific list of network interfaces.
  • @nic:<iface>[,<nic-key> ...] β€” query metadata for a specific network interface. the interface gets looked up by its local link-layer address first, then one or more NIC-specific keys get resolved. so you point at an interface and it finds it by its MAC, iykyk.

🌈 NIC KEYS 🌈

these are the aliases that get accepted after @nic:<iface> β€” little sub-aliases, like a group chat inside a group chat:

  • @mac β€” print the interface MAC address as exposed by the metadata service.
  • @ipv4 β€” print IPv4 address data for the interface.
  • @ipv6 β€” print IPv6 address data for the interface.
  • @ipv4-net β€” print IPv4 subnet information for the interface.
  • @ipv6-net β€” print IPv6 subnet information for the interface.
  • @ipv4-prefix β€” print delegated IPv4 prefix information for the interface.
  • @ipv6-prefix β€” print delegated IPv6 prefix information for the interface.

plus, on top of these aliases, raw provider-specific metadata paths may be used. and the output control tokens -e, +e, +n, +s, and +t are also accepted inside @nic: queries. inclusive king πŸ‘‘


🧚 ENVIRONMENT 🧚

  • CLOUD β€” cloud provider name. when it's set to auto, the autodetected provider is used. let the cloud decide, honestly.
  • IMDS_ENDPOINT β€” single provider metadata endpoint. used as the default value for IMDS_ENDPOINTS.
  • IMDS_ENDPOINTS β€” whitespace-separated provider metadata endpoint list. heads up bestie: IPv6 endpoints must use brackets, for example [fd00:ec2::254]. don't forget the brackets or it will not go well 😭
  • IMDS_ENDPOINT_WAIT_ATTEMPTS β€” number of times to check for routes to any IMDS endpoint before trying metadata requests anyway. the default is 10. ten little tries of hope.

πŸ“ EXIT STATUS πŸ“

  • 0 β€” all requested operations succeeded. we love a happy ending πŸ’–
  • 1 β€” a query failed and error handling was enabled.
  • 2 β€” an unknown option was given. unknown option?? not on my watch πŸ’€

πŸ”₯ EXAMPLES πŸ”₯

print the instance hostname:

$ imds @hostname

print user data and terminate with a newline:

$ imds @userdata +n

print IPv4 and IPv6 metadata for interface eth1:

$ imds @nic:eth1,@ipv4,@ipv6

query a raw metadata path:

$ imds meta-data/hostname

πŸ‘‘ SEE ALSO πŸ‘‘

tiny-cloud(8) β€” go read that one too, it's the whole ecosystem.


fr fr β€” if something here is dangerous or deprecated, take it seriously. the facts are the facts even when the vibe is immaculate.

that's the whole page babes πŸ’œ this was dated 2026-08-24, and it came out of the General Commands Manual β€” IMDS(1), and imds itself, wishing you a 0 exit status always. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from