Back to commands

Linux Survival Basics

Read-only

Check Domain A Records

You need to see current A records for a domain.

Command

dig +short example.com A

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not change DNS from this output without checking authoritative records and TTL.

Expected output

One or more IPv4 addresses, or no output if no A record is returned.

System impact

Read-only. Nothing changes. The command reads current state and prints diagnostic evidence.

Recovery / rollback: no state is changed.

When to use it

Use when HTTP-01 validation or site routing may point to the wrong host.

When not to use it

Do not change DNS from this output without checking authoritative records and TTL.

Example run

Commands shown

These are the commands shown for inspection. Treat them as an example, not proof that your system will behave identically.

  1. dig +short example.com A
  2. dig +short example.com A

next steps

Related commands

Hosting Operations Read-only

Check a Domain A Record

The site was fine. The domain was pointed somewhere else.

dig +short example.com A
Linux Survival Basics Read-only

Show HTTPS Certificate with curl

curl can show the certificate path a client actually sees.

curl -Iv https://example.com/ 2>&1 | sed -n "/SSL connection/,/expire date/p"
Web Server Rescue Read-only

Check CAA Certificate Issuers

The certificate request failed because DNS allowed the wrong issuer.

dig +short example.com CAA
Web Server Rescue Read-only

Compare DNS Answers Across Resolvers

One resolver can still have the old edge IP while another has the new one.

for r in 1.1.1.1 8.8.8.8 9.9.9.9; do printf '%s ' "$r"; dig @"$r" +short example.com A; done
Linux Survival Basics Sensitive output

Read TLS Certificate Subject and Issuer

The certificate can be valid but issued for the wrong name.

openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates

next diagnostic step

Where to go from this command

Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.