Beginner LevelLinux Commands & SysAdmin
What basic networking commands check connectivity (ping, traceroute, curl, dig, nslookup)?
❓ Interview Prompt: Explain ping (ICMP reachability), traceroute (network hop path), curl (HTTP requests), and dig/nslookup (DNS queries).
Diagnosing Linux network connectivity relies on standard networking utilities:
•
'ping host': Tests ICMP echo reachability and round-trip latency.
•
'traceroute host': Traces network router hops to destination IP.
•
'curl -I URL': Fetches HTTP response headers from web servers.
•
'dig domain' / 'nslookup domain': Queries DNS server record resolution.
Code Implementation Example
bash
# Test DNS resolution for domain
dig +short A google.com
# Inspect HTTP response headers of remote web server
curl -I -L https://example.com
# Trace network router hops
traceroute 8.8.8.8💡Diagnosing DNS resolution and HTTP endpoints using dig and curl.
🎯 Interview Key Takeaway
Use ping and traceroute for network reachability, dig for DNS queries, and curl for testing HTTP endpoints.
#Networking#curl#ping#dig#traceroute#Beginner
Back to all Linux Commands & SysAdmin Questions→