What happens, step by step, when you run `curl https://example.com`?
AdvancedConceptNetworking, SSH & Scheduling
Answer
- Name resolution via
/etc/nsswitch.conf→/etc/hosts→ DNS resolver in/etc/resolv.conf(oftensystemd-resolvedat 127.0.0.53). - Routing decision (
ip route get), ARP for the gateway MAC. - TCP three-way handshake to port 443.
- TLS handshake: SNI, certificate verification against the CA store, key exchange.
- HTTP request sent; response received and printed.
- Connection closed (or kept alive).
curl -v shows most of these steps.
More on Networking, SSH & Scheduling
Which `ip` commands replace ifconfig, route and arp?BeginnerWhat does `ss` show, and which flags do you use?BeginnerExplain the TCP connection states you see in ss.AdvancedWhich curl flags are most useful for debugging?BeginnerHow do you use `dig` for DNS troubleshooting?BeginnerWhat are /etc/hosts, /etc/resolv.conf and /etc/nsswitch.conf?Intermediate