Exam XK0-006 Topic 3 Question 148 Discussion

Actual exam question for CompTIA's XK0-006 exam
Question #: 148
Topic #: 3
Which of the following commands is used to verify whether a port is open on a remote host?

Suggested Answer: C Vote an answer

The correct answer is C. nc because netcat (nc) is specifically designed to test network connectivity, including verifying whether a particular port is open on a remote host. It is a versatile networking tool commonly used in troubleshooting and diagnostics.
Using a command such as nc -zv < hostname > < port > , an administrator can attempt to establish a connection to a remote port. The -z option tells netcat to scan for listening daemons without sending data, and the -v option enables verbose output, indicating whether the connection was successful or refused. This makes nc one of the most efficient tools for quickly validating port accessibility.
Option A (ip) is incorrect because the ip command is used for network interface configuration and routing, not for testing remote port connectivity.
Option B (ping) is incorrect because it tests basic network reachability using ICMP packets, but it does not verify whether specific TCP/UDP ports are open.
Option D (netstat) is incorrect because it displays network connections and listening ports on the local machine, not remote hosts.
From a Linux+ troubleshooting standpoint, identifying whether a service is reachable on a specific port is essential for diagnosing connectivity issues. Tools like nc, telnet, and nmap are commonly used for this purpose, but nc is preferred due to its simplicity and flexibility. It helps determine whether issues stem from firewall rules, service availability, or network path problems, making it a critical command in a system administrator's toolkit.

by Cedric at Jun 24, 2026, 11:27 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10