CompTIA XK0-006 (CompTIA Linux+) Practice Test 11

Question 100

A remote Ubuntu server uses Netplan, and an invalid change could disconnect SSH. Which command offers a rollback prompt?

  1. hosts: entry in /etc/nsswitch.conf
  2. netplan try
  3. /etc/resolv.conf
  4. /etc/hosts

Explanation

Correct Answer

B:

netplan try temporarily applies a candidate configuration and reverts it if not confirmed. This is safer for remote network changes than an unconditional apply.

Incorrect Answers

A:

Name Service Switch specifies the source order for lookups such as hosts and users; its scope differs from testing a netplan change with rollback, so it cannot meet the stated requirement.

C:

resolv.conf exposes resolver configuration, often generated by NetworkManager or systemd-resolved; the administrator instead needs testing a netplan change with rollback; this option serves a different purpose.

D:

The hosts file provides local name-to-address entries consulted according to NSS ordering; it answers a neighboring question rather than testing a netplan change with rollback.

Question 101

A packet path is suspected to contain a blackhole. Which utility shows intermediate IPv4 hops to the destination?

  1. ethtool eth0
  2. dig @192.0.2.53 host.example A
  3. traceroute destination.example
  4. nc -vz server.example 443

Explanation

Correct Answer

C:

traceroute probes with changing hop limits to infer routers along a path. Filtering may hide some hops, so missing replies do not always mean a failure.

Incorrect Answers

A:

ethtool reads link properties exposed by the Ethernet driver, including negotiated speed and duplex; this does not achieve discovering intermediate network hops on the system described.

B:

dig can direct a DNS query to a specific resolver and select a record type; it will not provide discovering intermediate network hops under these conditions.

D:

Netcat can attempt a TCP connection and report success or failure; the requirement is discovering intermediate network hops, outside the effect of this choice.

Question 102

A new NIC shows no carrier after a cable replacement. Which command checks its administrative and operational link state?

  1. nmap -sT host.example
  2. ip link show dev eth0
  3. nslookup 192.0.2.20
  4. dig @192.0.2.53 host.example A
  5. traceroute destination.example

Explanation

Correct Answer

B:

ip link reports interface flags and state, including whether the device is administratively up. It does not prove end-to-end TCP service reachability.

Incorrect Answers

A:

Nmap probes network ports and reports reachability and service hints; the evidence calls for identifying whether a network link is up, not merely this separate operation.

C:

nslookup performs DNS address and name queries against resolver infrastructure; its scope differs from identifying whether a network link is up, so it cannot meet the stated requirement.

D:

dig can direct a DNS query to a specific resolver and select a record type; that is not equivalent to identifying whether a network link is up.

E:

traceroute probes with changing hop limits to infer routers along a path; the administrator instead needs identifying whether a network link is up; this option serves a different purpose.

Question 103

A firewall rule may block port 443 on a remote host. Which command makes a basic TCP connect probe?

  1. curl -I https://example.org
  2. nc -vz server.example 443
  3. iperf3
  4. nmap -sT host.example

Explanation

Correct Answer

B:

Netcat can attempt a TCP connection and report success or failure. That result tests reachability, not full TLS certificate validity.

Incorrect Answers

A:

curl -I requests response headers using an HTTP HEAD request where supported; it answers a neighboring question rather than testing a remote TCP port connection.

C:

iperf3 sends measurement traffic between endpoints and reports throughput metrics; this does not achieve testing a remote TCP port connection on the system described.

D:

Nmap probes network ports and reports reachability and service hints; it will not provide testing a remote TCP port connection under these conditions.

Question 104

The operations team needs a forward and reverse name lookup from the configured resolver in a familiar interactive tool. Which utility is suitable?

  1. nslookup 192.0.2.20
  2. iperf3
  3. ip route show
  4. nc -vz server.example 443
  5. ip address show dev eth0
  6. curl -I https://example.org

Explanation

Correct Answer

A:

nslookup performs DNS address and name queries against resolver infrastructure. It does not consult all NSS sources used by ordinary Linux applications.

Incorrect Answers

B:

iperf3 sends measurement traffic between endpoints and reports throughput metrics; it does not deliver querying DNS for a reverse address mapping, which is decisive in this scenario.

C:

ip route prints installed kernel routes and next-hop information; the evidence calls for querying DNS for a reverse address mapping, not merely this separate operation.

D:

Netcat can attempt a TCP connection and report success or failure; the task involves querying DNS for a reverse address mapping, whereas this addresses another subsystem.

E:

ip address displays interface addresses and prefixes from the kernel; its scope differs from querying DNS for a reverse address mapping, so it cannot meet the stated requirement.

F:

curl -I requests response headers using an HTTP HEAD request where supported; that is not equivalent to querying DNS for a reverse address mapping.

Question 105

A technician needs duplex, negotiated speed and link detection from an Ethernet port. Which utility provides these settings?

  1. tcpdump -i eth0 port 53 -w dns.pcap
  2. ethtool eth0
  3. nslookup 192.0.2.20
  4. iperf3

Explanation

Correct Answer

B:

ethtool reads link properties exposed by the Ethernet driver, including negotiated speed and duplex. It does not edit DNS resolver configuration.

Incorrect Answers

A:

tcpdump captures packets matching a filter and can write them to a pcap file; that is not equivalent to checking physical Ethernet negotiation.

C:

nslookup performs DNS address and name queries against resolver infrastructure; it answers a neighboring question rather than checking physical Ethernet negotiation.

D:

iperf3 sends measurement traffic between endpoints and reports throughput metrics; that changes a different part of the system; the requested outcome is checking physical Ethernet negotiation.

Question 106

On a NetworkManager-managed server, a persistent static IP must be added to a connection profile. Which interface is suitable?

  1. netplan apply
  2. nmcli connection modify
  3. nmcli connection show
  4. hosts: entry in /etc/nsswitch.conf

Explanation

Correct Answer

B:

nmcli edits NetworkManager connection profiles, including addresses, gateways and DNS. Activating the profile applies the settings to the device.

Incorrect Answers

A:

netplan apply generates and activates backend networking configuration; it will not provide editing a NetworkManager network profile under these conditions.

C:

The command lists saved and active profiles with connection identifiers and device associations; the requirement is editing a NetworkManager network profile, outside the effect of this choice.

D:

Name Service Switch specifies the source order for lookups such as hosts and users; it does not deliver editing a NetworkManager network profile, which is decisive in this scenario.

Question 107

On a machine with one public uplink, which routing entry is commonly used when no more-specific destination route matches?

  1. ip route get 203.0.113.8
  2. ip -6 addr show dev eth0
  3. 127.0.0.1
  4. Default route 0.0.0.0/0

Explanation

Correct Answer

D:

The default IPv4 route is a fallback used after more specific routes are considered. Its next hop usually leads to another network.

Incorrect Answers

A:

ip route get resolves the kernel's forwarding decision for a destination, including preferred source and next hop; the task involves selecting a fallback for otherwise unknown destinations, whereas this addresses another subsystem.

B:

The -6 flag restricts ip output to the IPv6 address family; its scope differs from selecting a fallback for otherwise unknown destinations, so it cannot meet the stated requirement.

C:

The IPv4 loopback address accepts local-host connections but is not routed over the external network; that is not equivalent to selecting a fallback for otherwise unknown destinations.

Question 108

NetworkManager is active; the team needs to display all configured connection profiles. Which command lists them?

  1. nmcli connection show
  2. /etc/hosts
  3. hosts: entry in /etc/nsswitch.conf
  4. netplan status

Explanation

Correct Answer

A:

The command lists saved and active profiles with connection identifiers and device associations. Profiles are not identical to the kernel's live IP routes.

Incorrect Answers

B:

The hosts file provides local name-to-address entries consulted according to NSS ordering; this does not achieve listing NetworkManager connection profiles on the system described.

C:

Name Service Switch specifies the source order for lookups such as hosts and users; it will not provide listing NetworkManager connection profiles under these conditions.

D:

netplan status summarizes current network links and addressing as seen through its backends; using it would leave listing NetworkManager connection profiles unresolved.

Question 109

A flaky WAN exhibits both variable latency and occasional loss. Which tool combines repeated probes with hop-by-hop statistics?

  1. ip route show
  2. mtr destination.example
  3. ping -c 4 192.0.2.20
  4. nc -vz server.example 443
  5. curl -I https://example.org

Explanation

Correct Answer

B:

mtr combines traceroute-style path discovery with repeated latency and packet-loss sampling. Intermediate-hop filtering must be interpreted cautiously.

Incorrect Answers

A:

ip route prints installed kernel routes and next-hop information; it does not deliver tracing repeated latency and loss across routers, which is decisive in this scenario.

C:

ping sends ICMP echo probes and measures round-trip timing; the task involves tracing repeated latency and loss across routers, whereas this addresses another subsystem.

D:

Netcat can attempt a TCP connection and report success or failure; its scope differs from tracing repeated latency and loss across routers, so it cannot meet the stated requirement.

E:

curl -I requests response headers using an HTTP HEAD request where supported; that is not equivalent to tracing repeated latency and loss across routers.

Question 110

Netplan YAML has been reviewed and the new definition must be activated without a confirmation timeout. Which command applies it?

  1. netplan apply
  2. /etc/resolv.conf
  3. netplan try
  4. nmcli connection modify

Explanation

Correct Answer

A:

netplan apply generates and activates backend networking configuration. Care is needed on remote hosts because an incorrect route can sever the session.

Incorrect Answers

B:

resolv.conf exposes resolver configuration, often generated by NetworkManager or systemd-resolved; it answers a neighboring question rather than activating a saved Netplan configuration.

C:

netplan try temporarily applies a candidate configuration and reverts it if not confirmed; that changes a different part of the system; the requested outcome is activating a saved Netplan configuration.

D:

nmcli edits NetworkManager connection profiles, including addresses, gateways and DNS; this does not achieve activating a saved Netplan configuration on the system described.

CompTIA Linux+ (XK0-006) Practice Tests