Linux Networking Commands – Full Quiz
← Back to Networking Commands
← Back to Linux Commands
← Back to Quiz Home
This quiz contains 20 questions focused on Linux networking commands.
These commands are essential for cloud servers, Docker, Kubernetes, and production troubleshooting .
Which command displays network interfaces and IP addresses?
The ip addr (or simply ip a) command shows IP addresses and property information for all network interfaces.
Which command is commonly used to test network connectivity?
ping sends ICMP ECHO_REQUEST packets to network hosts to check if they are reachable.
Which command replaces ifconfig on modern Linux systems?
The ip command from the iproute2 package has replaced the deprecated ifconfig command.
Which command shows listening ports and active connections?
ss (socket statistics) is used to dump socket statistics and is faster/more comprehensive than netstat.
Which legacy command was commonly used to view network connections?
netstat was the standard tool for printing network connections, routing tables, and interface statistics before being superseded by ss and ip.
Which command is used to fetch data from a URL?
curl (Client URL) is a command-line tool for transferring data using various protocols, commonly HTTP/HTTPS.
Which command downloads files from the internet?
wget is a non-interactive network downloader used to download files from the web.
Which option with curl is used to make a HEAD request?
The -I (or --head) option fetches the HTTP headers only, which is useful for debugging server responses.
Which command checks DNS resolution?
nslookup is a network administration tool for querying the Domain Name System (DNS) to obtain domain name or IP address mapping.
Which command traces the network path to a host?
traceroute tracks the route packets take to reach a network host, showing each hop along the way.
Which command displays routing table information?
ip route displays and manipulates the kernel's routing table.
Which command shows only TCP listening ports?
The flags -t (TCP), -l (listening), and -n (numeric) combine to show listening TCP sockets.
Which command is useful to check open ports on localhost?
ss is the primary tool to check which ports are currently open and listening on the server.
Which command helps debug HTTP response codes?
By inspecting the headers with curl -I, you can see the HTTP status code (e.g., 200 OK, 404 Not Found).
Which command tests whether a specific port is reachable?
nc (netcat) is versatile and can check connectivity to specific TCP/UDP ports (e.g., nc -zv host port).
Which command displays network statistics?
ss provides detailed statistics about network sockets.
Which command is often blocked by firewalls but used for reachability tests?
ping uses ICMP, which is frequently blocked by firewalls for security reasons, unlike standard TCP/HTTP traffic.
Which command is commonly used inside Kubernetes pods for network testing?
curl is almost always included in container images and is essential for testing service connectivity within clusters.
Which protocol does ping use?
Ping is based on the Internet Control Message Protocol (ICMP).
Which command is most useful for debugging service-to-service communication?
curl allows you to simulate requests between services to verify connectivity and API responses.
Quiz Progress
0 / 0 questions answered
(0% )
0 correct
Quiz Complete!
0%
Reset quiz
📩 Get weekly DevOps quizzes & guides
📬 Weekly DevOps, Cloud & Gen AI quizzes & guides