<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/dns-resolve-commands-every-developer-and-system-administrator-should-know-6v02jixft" -->

---
title: DNS Resolve Commands Every Developer and System...
description: A practical overview of four essential DNS resolve commands: dig, nslookup, host, and resolvectl. Covers when to use each tool, basic syntax examples, and...
canonical: https://daily.dev/posts/dns-resolve-commands-every-developer-and-system-administrator-should-know-6v02jixft
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: DNS Resolve Commands Every Developer and System Administrator Should Know | daily.dev
og:description: A practical overview of four essential DNS resolve commands: dig, nslookup, host, and resolvectl. Covers when to use each tool, basic syntax examples, and...
og:url: https://daily.dev/posts/dns-resolve-commands-every-developer-and-system-administrator-should-know-6v02jixft
og:image: https://api.daily.dev/og/posts/6V02JIxFT.png
og:image:alt: DNS Resolve Commands Every Developer and System Administrator Should Know
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# DNS Resolve Commands Every Developer and System Administrator Should Know

**[Medium](https://daily.dev/sources/medium_js)** · 4 min read · 1 upvotes · 0 comments

## Summary

A practical overview of four essential DNS resolve commands: dig, nslookup, host, and resolvectl. Covers when to use each tool, basic syntax examples, and common DNS issues they can diagnose such as propagation delays, misconfigured nameservers, and cached responses.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@aatreyaadvith/dns-resolve-commands-every-developer-and-system-administrator-should-know-a0097ada0a4a>

## Questions this post answers

### What is the difference between dig and nslookup for DNS troubleshooting?

Dig provides detailed DNS record information (A, AAAA, MX, TXT, NS) and is preferred for in-depth troubleshooting by Linux admins and DevOps professionals, while nslookup is a simpler, faster tool available on Windows, Linux, and macOS for quick domain resolution checks. Use dig +short example.com for just the IP address.

_daily.dev surfaces practical networking guides for developers comparing dns diagnostic tools._

### How do I flush the DNS cache on a modern Linux system using resolvectl?

Run resolvectl flush-caches to clear cached DNS entries on systems using resolvectl, which many modern Linux distributions rely on for DNS query and cache management. This is useful when testing recent DNS updates that don't seem to be reflected, since stale cached responses can otherwise mask changes.

_Developers debugging stale dns records after updates can find similar troubleshooting steps on daily.dev._

## Similar posts on daily.dev

- [DNS Explained - How Domain Names Get Resolved](https://daily.dev/posts/dns-explained---how-domain-names-get-resolved-zhpljm8wy) · Hacker News · 3 upvotes · 0 comments
- [I diagnosed my network outage with one command, and it saved me hours of troubleshooting](https://daily.dev/posts/i-diagnosed-my-network-outage-with-one-command-and-it-saved-me-hours-of-troubleshooting-8xl6najwi) · XDA Developers · 1 upvotes · 0 comments
- [DNS Exists Because Nobody Can Know Every Name: Rethinking Distributed Computing \#10](https://daily.dev/posts/dns-exists-because-nobody-can-know-every-name-rethinking-distributed-computing-10-qqncwgwvr) · Medium · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#networking](https://daily.dev/tags/networking), [#dns](https://daily.dev/tags/dns)

[View this post on daily.dev](https://daily.dev/posts/dns-resolve-commands-every-developer-and-system-administrator-should-know-6v02jixft)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"DNS Resolve Commands Every Developer and System Administrator Should Know","url":"https://daily.dev/posts/dns-resolve-commands-every-developer-and-system-administrator-should-know-6v02jixft","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/dns-resolve-commands-every-developer-and-system-administrator-should-know-6v02jixft"},"datePublished":"2026-07-25T07:32:23.307Z","dateModified":"2026-09-13T19:41:19.731Z","description":"A practical overview of four essential DNS resolve commands: dig, nslookup, host, and resolvectl. Covers when to use each tool, basic syntax examples, and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/11c38fc2e4148061398c133c70e0e377?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/11c38fc2e4148061398c133c70e0e377?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/dns-resolve-commands-every-developer-and-system-administrator-should-know-6v02jixft","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,networking,dns","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"DNS Resolve Commands Every Developer and System Administrator Should Know"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/dns-resolve-commands-every-developer-and-system-administrator-should-know-6v02jixft#faq","mainEntity":[{"@type":"Question","name":"What is the difference between dig and nslookup for DNS troubleshooting?","acceptedAnswer":{"@type":"Answer","text":"Dig provides detailed DNS record information (A, AAAA, MX, TXT, NS) and is preferred for in-depth troubleshooting by Linux admins and DevOps professionals, while nslookup is a simpler, faster tool available on Windows, Linux, and macOS for quick domain resolution checks. Use dig +short example.com for just the IP address. daily.dev surfaces practical networking guides for developers comparing dns diagnostic tools."}},{"@type":"Question","name":"How do I flush the DNS cache on a modern Linux system using resolvectl?","acceptedAnswer":{"@type":"Answer","text":"Run resolvectl flush-caches to clear cached DNS entries on systems using resolvectl, which many modern Linux distributions rely on for DNS query and cache management. This is useful when testing recent DNS updates that don't seem to be reflected, since stale cached responses can otherwise mask changes. Developers debugging stale dns records after updates can find similar troubleshooting steps on daily.dev."}}]}
```

