nerdexam
Cisco

210-255 · Question #91

Which netstat command show ports?

The correct answer is B. netstat -l. The netstat -l command filters output to display only sockets in the listening state and their associated ports.

Host-Based Analysis

Question

Which netstat command show ports?

Options

  • Anetstat -a
  • Bnetstat -l
  • Cnetstat -v
  • Dnetstat -g

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    90% (26)
  • D
    7% (2)

Why each option

The netstat -l command filters output to display only sockets in the listening state and their associated ports.

Anetstat -a

netstat -a shows all active connections AND listening ports combined, not exclusively listening ports.

Bnetstat -lCorrect

The netstat -l (--listening) option restricts output to sockets that are actively listening for incoming connections, directly showing which ports are open and waiting for traffic. This is more targeted than other options because it isolates listening ports without mixing in established or other connection states.

Cnetstat -v

netstat -v enables verbose mode to add extra detail to existing output; it does not filter or display ports specifically.

Dnetstat -g

netstat -g displays multicast group membership information and has no relationship to port listings.

Concept tested: netstat command options for viewing listening ports

Source: https://linux.die.net/man/8/netstat

Topics

#netstat#listening ports#host commands#CLI tools

Community Discussion

No community discussion yet for this question.

Full 210-255 Practice