Local DNS and DHCP With dnsmasq
Serve DNS names and DHCP leases on a small network.
01Command
$ dnsmasq --test02What it does
dnsmasq forwards DNS queries, caches answers and can serve names from /etc/hosts or its own config, plus DHCP for a LAN. It is widely used on routers and home labs for its tiny footprint.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Debian package: dnsmasqEvidence: Debian packages dnsmasq, a small caching DNS forwarder and DHCP server.
- dnsmasq documentationEvidence: Debian packages dnsmasq, a small caching DNS forwarder and DHCP server.
Last verified: 2026-09-22 · Category: Network
06Related solutions
Query any DNS record type for a domain, with a compact answer or the full response including headers and TTLs.
One command that prints every interface with its state and IPv4/IPv6 addresses in a short table — the modern, memorable replacement for digging through `ifconfig` or the verbose `ip addr` output.
The classic forgotten-syntax command: `traceroute` shows every router between you and a destination plus the round-trip time of probes to each hop.