ADDR2NAME(1)
β¨ addr2name(1) β¨ User's Manual π
β¨ NAME β¨
okay bestie, the names here are addr2name and name2addr, and they both do one job: perform DNS lookups from scripts π
πΈ
πΈ SYNOPSIS πΈ
addr2name [-46cmnr] [HOSTNAMES]
name2addr [-46cn] [HOSTNAMES]
π DESCRIPTON π
so this one writes the addresses or the canonical hostname of whatever names you give it to the standard output π«Ά if you don't pass any names on the command line, it just reads them from the standard input instead. no cap, super convenient for scripts β¨
π OPTIONS π
-4,--ipv4β only try IPv4 lookups π-6,--ipv6β only try IPv6 lookups π¦-c,--configβ only look up and print results for address families that match locally configured addresses. if the system has no IPv4 resp IPv6 address, then IPv4 resp IPv6 addresses are ignored π§-h,--helpβ show some help and exit π-m,--multipleβ normally, if a name yields multiple results, only the first one gets printed π with this option, all the results get printed on a single line, separated by spaces π-n,--numericβ prevent the forward hostname lookup. this makes sure the input names are numeric addresses, which means they don't need looking up π it's typically used along with--reverseto convert numerical addresses to canonical hostnames π₯-r,--reverseβ perform a reverse DNS lookup (this is enabled implicitly withaddr2name) β¨ by default,addr2nameprints numerical resolved addresses instead π«Ά--versionβ show the program version and license, then exit π
the -n flag is a vibe check: it skips the forward lookup, so your input has to already be numeric addresses π
π¦ SEE ALSO π¦
host(1), getaddrinfo(3), getnameinfo(3), resolv.conf(5) π·
π AUTHOR π
RΓ©mi Denis-Courmont <remi at remlab dot net> π
http://www.remlab.net/ndisc6/ π
bye bestie, this page came from source addr2name with the date stamp $Date$ (unexpanded, lol) and the footer says ADDR2NAME(1) πβ¨ stay hydrated and keep your DNS slay ππ«Ά
π¦ where this page comes from
- alpine 3.22: ndisc6-doc 1.0.8-r1 Β· GPL-2.0-or-later
- alpine 3.23: ndisc6-doc 1.0.8-r1 Β· GPL-2.0-or-later
- alpine 3.24: ndisc6-doc 1.0.8-r1 Β· GPL-2.0-or-later
- arch rolling: ndisc6 1.0.9-1 Β· GPL-2.0-only OR GPL-3.0-only
- debian bookworm: ndisc6 1.0.5-1+b2
- debian trixie: ndisc6 1.0.7-1
- epel 10: ndisc6 1.0.8-4.el10_2 Β· GPL-2.0-only OR GPL-3.0-only
- epel 9: ndisc6 1.0.7-3.el9 Β· GPL-2.0-only OR GPL-3.0-only
- fedora 43: ndisc6 1.0.8-4.fc43 Β· GPL-2.0-only OR GPL-3.0-only
- fedora 44: ndisc6 1.0.8-5.fc44 Β· GPL-2.0-only OR GPL-3.0-only
- nixos 26.05: ndisc6 1.0.4
- nixpkgs unstable: ndisc6 1.0.9
- ubuntu jammy: ndisc6 1.0.4-2ubuntu2
- ubuntu noble: ndisc6 1.0.7-1ubuntu2
- ubuntu questing: ndisc6 1.0.7-1ubuntu2
- ubuntu resolute: ndisc6 1.0.8-1
- ubuntu stonking: ndisc6 1.0.8-1
- Copyright Β© 2006 RΓ©mi Denis-Courmont
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms