Skip to content

scutil MacOS Command Guide

The MacOS scutil command is a powerful tool for managing system configuration settings. It allows users to interact with the system configuration database, modify network settings, and perform various tasks related to networking and system configuration. With scutil, users can query, set, and delete configuration parameters, as well as perform tasks such as changing the computer name, hostname, and network interface settings. Additionally, the scutil command can be used to troubleshoot networking issues, manage network proxies, and configure VPN settings. Overall, the scutil command is a versatile tool for customizing and managing MacOS system settings.

scutil Syntax:

Terminal window
scutil [command] [parameters]

Options:

OptionDescription
-rRead configuration values.
-wWrite configuration values.
-ncDo not cache this value.
-nRead notification (no wait).
-nNRead notification (wait).
-nPRead notification (poll).
-rNRelease notification.
-aAuthenticate.
-hHelp.

Parameters:

ParameterDescription
keyThe key name to read or write.
valueThe value to write.
serviceThe service to operate on.
reasonThe reason for changing state.
keypathKey path for notification registration.
nameThe name of the notification to operate on.
callbackThe callback program to execute.
argumentsThe arguments to pass to the callback program.
config-fileThe configuration file that contains the configuration.

scutil Command Samples:

Show System Hostname

Terminal window
scutil --get HostName

Displays the current system hostname.

Show DNS Resolver Configuration

Terminal window
scutil --dns

Shows the DNS resolver configuration details.

Set Hostname

Terminal window
sudo scutil --set HostName new_hostname

Sets the system hostname to the specified value.

Show Current Network Configuration

Terminal window
scutil --get LocalHostName
scutil --get ComputerName

Displays the current local hostname and computer name.

Show System Global Hostname

Terminal window
scutil --get LocalHostName

Shows the global system hostname.

Show all Power Source Information

Terminal window
scutil --power

Displays information about all available power sources.

Show VPN Status

Terminal window
scutil --nc list

Shows the status of network interfaces including VPN connections.

scutil FAQ:

How do I set the computer’s hostname using scutil in MacOS?

To set the computer’s hostname with scutil in MacOS, use the following command:

Terminal window
sudo scutil --set HostName your-new-hostname

How do I display the current network configuration using scutil in MacOS?

To display the current network configuration with scutil in MacOS, execute the following command:

Terminal window
scutil --get LocalHostName

How do I list all network services with scutil in MacOS?

To list all network services using scutil in MacOS, run the following command:

Terminal window
scutil --nc list

How can I view the current IPv4 configuration using scutil in MacOS?

To view the current IPv4 configuration with scutil in MacOS, use the following command:

Terminal window
scutil --get State:/Network/Global/IPv4

How do I delete a specific network service with scutil in MacOS?

To delete a specific network service using scutil in MacOS, use the following command:

Terminal window
sudo scutil --nc delete "interface_name"

How can I view the current DNS configuration with scutil in MacOS?

To view the current DNS configuration using scutil in MacOS, run the following command:

Terminal window
scutil --dns

Applications of the scutil command

  • Changing network settings
  • Configuring DNS settings
  • Managing network services
  • Displaying network information
  • Setting computer hostname
  • Configuring dynamic store
  • Managing interface settings
  • Checking reachability of network hosts