TestOut Linux Pro Practice Test 2025 - Free Linux Pro Practice Questions and Study Guide

Question: 1 / 400

Which command displays network connections and listening ports in Linux?

ifconfig

netstat

The command that displays network connections and listening ports in Linux is netstat. This utility is widely used for network diagnostics and monitoring. It provides detailed information about the network status, including active connections, the state of TCP connections, and service listening for incoming connections on various ports. By running netstat, users can see which ports are open, which applications are utilizing network connections, and other critical statistics that help in managing network issues and configurations.

In contrast, ifconfig is primarily used for configuring and managing network interfaces, such as assigning IP addresses and enabling or disabling interfaces. While it provides some network interface information, it does not show active connections or listening ports.

Ping is a utility used to test the reachability of a host on a network, primarily by sending ICMP echo requests and waiting for replies. It measures round-trip time but does not provide details about network connections or port statuses.

Traceroute is used to determine the route packets take to reach a specific network destination. It can help diagnose routing issues but does not display information about listening ports or active network connections.

Thus, netstat is the correct and most comprehensive tool for viewing network connections and listening ports in Linux.

Get further explanation with Examzify DeepDiveBeta

ping

traceroute

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy