Skip to content

Instantly share code, notes, and snippets.

@eggplants
Created October 28, 2024 16:24
Show Gist options
  • Save eggplants/d1fe5c64413c9cae646b5727a3a1228f to your computer and use it in GitHub Desktop.
Save eggplants/d1fe5c64413c9cae646b5727a3a1228f to your computer and use it in GitHub Desktop.
Get your tailnet name with(out) jq from `tailscale status` output
#!/usr/bin/env bash
# get your tailnet name with jq:
tailscale status --json | jq -r '.MagicDNSSuffix'
# or, without jq:
tailscale status --json | grep -m1 MagicDNSSuffix | cut -f4 -d'"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment