Skip to content

Instantly share code, notes, and snippets.

@lwbt
Created November 10, 2024 20:07
Show Gist options
  • Save lwbt/842eaf0369b4abf008929835d7c339e1 to your computer and use it in GitHub Desktop.
Save lwbt/842eaf0369b4abf008929835d7c339e1 to your computer and use it in GitHub Desktop.
How to find the magicDNS domain name from CLI?
tailscale status -json | jq -r '.Self.DNSName[:-1]'
  • Requires tailscale and jq.
  • [:-1] removes the tailing dot.
    There may be other options -- like choosing a different field or choosing a another command instead of jq -- but I wanted to keep it brief.
  • Dicussed here, but the site is in read-only mode and may disappear. Let's hope the search results will fix themselves while I post it here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment