Command-Line Interface Flashcards
6 cards from real ACSP practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 Command-Line Interface flashcards as text
Which macOS command-line tool is used to manage disk volumes, including erasing and repairing disks?
Answer: diskutil
'diskutil' is macOS's command-line disk management tool that can list, verify, repair, erase, partition, and manage volumes. It mirrors the functionality of the graphical Disk Utility app.
What is the purpose of the 'defaults' command in macOS Terminal?
Answer: Read and write macOS application preference values stored in .plist files
The 'defaults' command reads and writes macOS application preferences stored in property list (.plist) files in ~/Library/Preferences/, allowing technicians to configure app and system settings from the command line.
Which command would a technician use to check and display the network routing table on a Mac?
Answer: netstat -r
'netstat -r' displays the kernel routing table, showing how the Mac routes network traffic to different destinations, including the default gateway and any static routes.
What does the 'ditto' command do in macOS Terminal?
Answer: Copies files and directories while preserving all macOS metadata, resource forks, and extended attributes
'ditto' copies files and directory hierarchies while preserving macOS-specific metadata including resource forks, extended attributes, ACLs, and HFS+ metadata that standard 'cp' may not preserve.
Which Terminal command shows real-time network connections and the ports they are using on a Mac?
Answer: lsof -i
'lsof -i' (list open files, internet) shows all current network connections including the process name, PID, local address, remote address, and connection state — useful for identifying what is using a specific port.
What is the function of the 'plutil' command in macOS Terminal?
Answer: Check, convert, and lint property list (.plist) files
'plutil' (property list utility) can verify syntax, convert between plist formats (binary, XML, JSON), and extract or modify values in .plist configuration files used throughout macOS.