Syntax
scutil [-r node_or_address | -w key [-t timeout]]
Description
Provides control of the System Configuration
framework's dynamic store. scutil
opens an interactive session with
configd, in which various commands are available
to view and modify System Configuration keys.
As a quick sample run-through, invoke scutil.
You will be placed at the scutil prompt. Enter
open to start the session with
configd, then enter list.
You will see a set of keys, some of which are provided by the System
Configuration framework (such as the keys in the
File: domain), some of which are obtained from the
preferences file /var/db/SystemConfiguration.xml
(the Setup: keys), and some of which are published
by the configuration agents (the State: keys).
Enter get State:/Network/Global/DNS to load
the dictionary associated with that key. Then run
d.show to display it. You should see a list of
DNS servers and search domains configured on your system. Finally,
run close, then quit.
Options/Usage
- -r
-
Checks for reachability of the node or address. (Any numerical
argument seems to result in Reachable status.)
- -t
-
Specifies the timeout to wait for the presence of a data store key,
in seconds. The default is 15.
- -w
-
Exits when the specified key exists in the data store or when the
timeout has expired.
Commands
scutil enters interactive mode when it is
invoked with no arguments.
- add key [temporary]
-
Adds a key to the data store with the value of the current
dictionary. The temporary keyword causes it to be flushed when the
session to configd is closed.
- close
-
Closes a session with configd.
- d.add key [* | ? | #] value...
-
Adds an entry to the current dictionary. The optional type specifier
can designate the values as arrays (*),
booleans (?), or numbers (#).
- d.init
-
Creates an empty dictionary.
- d.remove key
-
Removes the specified key from the current dictionary.
- d.show
-
Displays the contents of the current dictionary.
- f.read file
-
Reads prepared commands from a file.
- get key
-
Causes the value of the specified key to become the current
dictionary.
- help
-
Prints a list of available commands.
- list [key_pattern]
-
Lists keys in the System Configuration data store. The
key_pattern can restrict which keys are
output, but key_pattern appears to be
quite limited.
- n.add { key | key_pattern }
-
Requests notification of changes to the specified keys.
- n.cancel
-
Cancels n.watch settings.
- n.changes
-
Lists changed keys that have been marked with notification requests.
- n.list [key_pattern]
-
Lists keys upon which notification requests have been set.
- n.remove { key | key_pattern }
-
Removes notification requests for the specified keys.
- n.watch [verbose]
-
Causes changes to keys marked with notification requests to issue
immediate notices, obviating the need to use
n.changes to serve notice that the change has
occurred.
- notify key
-
Sends a notification for the specified key.
- open
-
Opens a session with configd.
- quit
-
Exits the scutil session.
- remove key
-
Removes the specified key from the data store.
- set key
-
Sets the specified key to the value of the current dictionary.
Location
/usr/sbin
Operating System
Darwin