2 min read

Managing System Configuration with Scutil on macOS Tahoe

scutil (System Configuration Utility) is a command-line tool used to manage system configuration parameters on macOS. It is particularly useful for managing computer names and troubleshooting DNS issues.

Managing Computer Names

macOS has three different names for your computer, and they can sometimes get out of sync. scutil allows you to view and set them individually.

The Three Names

  1. ComputerName: The user-friendly name seen in Finder and AirDrop (e.g., "John's MacBook Pro").
  2. LocalHostName: The name used for local network services like Bonjour (e.g., "Johns-MacBook-Pro.local").
  3. HostName: The name used in the terminal and by SSH (e.g., "johns-mbp").

Viewing Names

To see the current values:

scutil --get ComputerName
scutil --get LocalHostName
scutil --get HostName

Setting Names

To change these names, you need sudo privileges.

sudo scutil --set ComputerName "Tahoe-Workstation"
sudo scutil --set LocalHostName "Tahoe-Workstation"
sudo scutil --set HostName "tahoe-workstation"

Troubleshooting DNS

If you are having internet connectivity issues or can't reach specific websites, scutil provides a detailed view of how macOS is resolving DNS.

To show the current DNS configuration:

scutil --dns

This outputs a list of resolvers.

  • resolver #1: This is usually your primary DNS configuration (from Wi-Fi or Ethernet).
  • Look for nameserver[0] to see which DNS server your Mac is actually querying (e.g., 8.8.8.8 or your router's IP).

Checking Proxy Settings

To see if a system-wide proxy is configured:

scutil --proxy

Monitoring Network Reachability

You can use scutil to check if a specific host is reachable according to the system's routing table.

scutil -r google.com

Output:

  • Reachable: The system has a route to the host.
  • ConnectionRequired: You might need to initiate a VPN or dial-up connection.

For more networking tools, refer to Networking Commands on macOS Tahoe.