220-1102 Question 231
Single answerTerminalA technician is troubleshooting a macOS workstation that repeatedly fails to open a shared folder after a configuration change. The user reports that Finder shows an error, but the technician wants to verify network connectivity to the file server from the command line before changing any settings. Which Terminal command should the technician use FIRST to test basic reachability to the server named fileserver.company.local?
- A
ping fileserver.company.local
- B
chmod 755 fileserver.company.local
- C
grep fileserver.company.local /etc/hosts
- D
sudo killall Finder
Show answer and explanation
Correct answer: A
Explanation
When troubleshooting access to a shared resource from macOS Terminal, best practice is to begin with the least invasive diagnostic step that confirms basic connectivity. The ping command is commonly used first to verify that the hostname resolves and that the remote host responds over the network. If ping fails, the technician can then move on to deeper checks such as DNS resolution, routing, firewall rules, or SMB-specific troubleshooting. Commands like chmod and killall Finder do not address network reachability, and checking /etc/hosts only inspects one possible source of name resolution rather than testing end-to-end communication. This aligns with standard troubleshooting methodology used in operating systems covered by CompTIA A+ Core 2: identify the problem, test simple likely causes first, and avoid unnecessary changes until basic connectivity has been confirmed.
- A. Correct.
Correct. The ping command is an appropriate first step in Terminal to test basic network reachability and name resolution to the target host. If the hostname resolves and the system receives replies, the technician can confirm that the Mac can at least reach the server over the network layer. This is a practical first check before modifying SMB settings, credentials, or Finder preferences.
- B. Incorrect.
Incorrect. chmod changes file or directory permissions in macOS, Linux, and other Unix-like systems. It does not test connectivity to a remote server. A candidate might choose this if they are thinking about access problems, but chmod applies to local filesystem permissions, not network reachability.
- C. Incorrect.
Incorrect. grep fileserver.company.local /etc/hosts would only search the local hosts file for a static entry. While that could help investigate name resolution in some cases, it does not test whether the server is reachable across the network. It is a narrower diagnostic step and not the best first command for confirming basic connectivity.
- D. Incorrect.
Incorrect. sudo killall Finder restarts Finder, which may refresh the desktop or file browsing interface, but it does not test whether the remote server can be reached. Someone might pick this because Finder is involved in opening the shared folder, but restarting the application does not verify network connectivity.