dns

dns inspects DNS records by type, checks whether selected records exist and performs reverse PTR lookups for IP addresses.

NetworkVersion 1.2.4Stable
lil-terminal

Overview

Use dns for DNS records and reverse lookups. Common operations stay short; specialized forms add detail only when needed, so repeated work remains easy to understand, repeat and place in lil-terminal scripts.

Read DNS by record type

A and AAAA map names to addresses, MX describes mail routing, TXT often carries verification or policy data, NS shows delegation, CAA limits certificate authorities and PTR maps an address back to a name. An empty answer for one type does not mean the domain itself is missing.

Syntax

lil-terminal
dns <host|ip|me> [types] [-c]

Reference

dns me

use the current host

dns example.com

show common records

dns example.com -mx

show only MX records

dns example.com -txt

show only TXT records

dns example.com <types>

show selected record types

dns 1.2.3.4

show a reverse PTR lookup

dns example.com -c

check which selected record types exist

-a | -aaaa

select A or AAAA address records

-cname

select CNAME alias records

-mx

select MX mail-exchanger records

-ns

select NS name-server records

-txt

select TXT text records

-soa

select the SOA authority record

-srv

select SRV service records

-caa

select CAA certificate-authority records

-ptr

select PTR reverse records

-all

select all supported types; the default common set omits SRV and PTR

Practical workflow

Start with dns example.test for common record types, then narrow the question with -mx, -txt, -a or -aaaa. Combine flags to check several types; -c reports which requested types have any results, not whether all of them exist. Use -all to include SRV and PTR; an IP address automatically triggers reverse PTR lookup. dns me uses the request host of the current terminal installation, not the visitor’s IP.

Limits and safety

DNS results change with authoritative data, caches and the hosting resolver; no record for a type does not prove the domain is nonexistent. Reverse PTR must be configured by the IP address owner. This command reads records only and cannot edit DNS zones. Examples use an isolated, fictional example.test zone and prepared replies, not live DNS lookups.

Notes

The default set is A, AAAA, CNAME, MX, NS, TXT, SOA and CAA. -all is intentionally not redundant: it additionally requests SRV and PTR, which are often absent and can make a broad query noisier. Multi-part record values use a visible “ · ” separator so priority, target and TTL remain easy to scan.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Compare common DNS records with MX

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install dns
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install dns -m
Exact public version

Install exactly this published version.

install dns -v 1.2.4
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade dns
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install dns -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Compare common DNS records with MX
dns example.test
Offline educational example — not a live lookup
A     192.0.2.80  ·  TTL 3600
AAAA  2001:db8::80  ·  TTL 3600
MX    10  ·  mail.example.test  ·  TTL 3600
NS    ns1.example.test  ·  TTL 3600
TXT   v=spf1 -all  ·  TTL 3600
SOA   ns1.example.test  ·  admin.example.test  ·  2026110101  ·  7200  ·  3600  ·  1209600  ·  3600  ·  TTL 3600
CAA   0  ·  issue  ·  letsencrypt.org  ·  TTL 3600
Use the current host
dns me
Offline educational example — not a live lookup
A     192.0.2.80  ·  TTL 3600
AAAA  2001:db8::80  ·  TTL 3600
MX    10  ·  mail.example.test  ·  TTL 3600
NS    ns1.example.test  ·  TTL 3600
TXT   v=spf1 -all  ·  TTL 3600
SOA   ns1.example.test  ·  admin.example.test  ·  2026110101  ·  7200  ·  3600  ·  1209600  ·  3600  ·  TTL 3600
CAA   0  ·  issue  ·  letsencrypt.org  ·  TTL 3600
Select A or AAAA address records
dns example.test -a
Offline educational example — not a live lookup
A  192.0.2.80  ·  TTL 3600
Select A or AAAA address records
dns example.test -aaaa
Offline educational example — not a live lookup
AAAA  2001:db8::80  ·  TTL 3600
Select CNAME alias records
dns alias.example.test -cname
Offline educational example — not a live lookup
CNAME  site.example.test  ·  TTL 3600
Show only MX records
dns example.test -mx
Offline educational example — not a live lookup
MX  10  ·  mail.example.test  ·  TTL 3600
Select NS name-server records
dns example.test -ns
Offline educational example — not a live lookup
NS  ns1.example.test  ·  TTL 3600
Show only TXT records
dns example.test -txt
Offline educational example — not a live lookup
TXT  v=spf1 -all  ·  TTL 3600
Handle a name that does not resolve
dns example.test -soa
Offline educational example — not a live lookup
SOA  ns1.example.test  ·  admin.example.test  ·  2026110101  ·  7200  ·  3600  ·  1209600  ·  3600  ·  TTL 3600
Select SRV service records
dns _sip._tcp.example.test -srv
Offline educational example — not a live lookup
SRV  10  ·  5  ·  5060  ·  sip.example.test  ·  TTL 3600
Select CAA certificate-authority records
dns example.test -caa
Offline educational example — not a live lookup
CAA  0  ·  issue  ·  letsencrypt.org  ·  TTL 3600
Show a reverse PTR lookup
dns 192.0.2.44
Offline educational example — not a live lookup
PTR  host.example.test
Select PTR reverse records
dns example.test -ptr
Offline educational example — not a live lookup
DNS records not found
Select all supported types; the default common set omits SRV and PTR
dns example.test -all
Offline educational example — not a live lookup
A     192.0.2.80  ·  TTL 3600
AAAA  2001:db8::80  ·  TTL 3600
MX    10  ·  mail.example.test  ·  TTL 3600
NS    ns1.example.test  ·  TTL 3600
TXT   v=spf1 -all  ·  TTL 3600
SOA   ns1.example.test  ·  admin.example.test  ·  2026110101  ·  7200  ·  3600  ·  1209600  ·  3600  ·  TTL 3600
CAA   0  ·  issue  ·  letsencrypt.org  ·  TTL 3600
Show selected record types
dns example.test -a -aaaa -mx
Offline educational example — not a live lookup
A     192.0.2.80  ·  TTL 3600
AAAA  2001:db8::80  ·  TTL 3600
MX    10  ·  mail.example.test  ·  TTL 3600
Check which selected record types exist
dns example.test -mx -c
Offline educational example — not a live lookup
Status  yes
Types   MX
Check which selected record types exist
dns example.test -srv -c
Offline educational example — not a live lookup
Status  no
Types   -
Check which selected record types exist
dns example.test -a -c
Offline educational example — not a live lookup
Status  yes
Types   A
Check which selected record types exist
dns example.test -all -c
Offline educational example — not a live lookup
Status  yes
Types   A, AAAA, MX, NS, TXT, SOA, CAA
Dns · test
dns example.test -bogus
Offline educational example — not a live lookup
?
Dns · 21
dns
Offline educational example — not a live lookup
?
Dns · -a
dns http://example.test/path -a
Offline educational example — not a live lookup
A  192.0.2.80  ·  TTL 3600
Dns · 44
dns 192.0.2.44 -a -c
Offline educational example — not a live lookup
Status  yes
Types   PTR

Related documentation

Current public release

v1.2.42026-08-10

Language synchronization

Finalizes Local and Server Help synchronization and localization safety for dns.