/var/run/resolve.conf is not used by max os
scutil
scutil --prefs [preference-file]
scutil -r [-W] { nodename | address | local-address remote-address }
scutil -w dynamic-store-key [-t timeout]
scutil --get pref
scutil --set pref [newval]
scutil --dns
scutil --proxy
scutil --nc nc-arguments
scutil --renew interface-name
Retain hostname:(Sequoia 15.2 )sudo scutil --set ComputerName YourComputerName sudo scutil --set HostName YourComputerName sudo scutil --set LocalHostName YourComputerName
With no options provides a command line interface to the "dynamic store" data maintained by configd.
--pref [file] interactive access to "raw" preference data. |
-r [-W] [-t secs] | ||||||||||||||||||||||||||||||||||||
--renew triggers a re-evaluation of the network configuration on the interface.
OPTIONS
-r [-W] { nodename | address | local-address remote-address }
Check the network reachability of the specified host name, IP address, or a pair of local and remote IP addresses.
Reachable can be reached using the current network configuration.
Transient Connection can be reached via a transient (e.g. PPP) connection.
Connection Required a connection must first be established. As an example, a dialup connection that was not
currently active but could handle network traffic for the target system.
Connection Automatic a connection must first be established.
traffic directed to the specified name/address will initiate the connection.
Local Address a network interface on this system.
Directly Reachable Addresss Network traffic is routed directly i.e. not through a gateway
Not Reachable cannot be reached using the current network configuration.
The reachability can also be monitored by specifying the -W (watch) option. This will result in the current status being
reported as well as the status when/if the network configuration changes.
A zero exit status will be returned when the reachability status is reported correctly. A non-zero exit status will be returned
if errors are detected with an error reported to standard error.
-w dynamic-store-key
[-t timeout] if the key exists in the "dynamic store" maintained by configd
returns 0 .
Waits for the data to be associated or a notification to be posted.
A non-zero exit status if the key was not created/posted within the specified time.
Waits indefinitely if a timeout of 0 . A very bad idea.
The default timeout is 15 seconds.
--get {ComputerName |
LocalHostName|
HostName
% scutil --get ComputerName
smac14
% scutil --get LocalHostName
smac14
% scutil --get HostName
--set {ComputerName |
LocalHostName|
HostName
[newval]
If newval is not specified on the command line it will be read from standard input.
--dns Reports DNS configuration.
--proxy Reports proxy configuration.
--nc nc-arguments commands for monitoring and interacting with VPN connections.
Use --nc help for a list of commands.
--renew interface-name Triggers a re-evaluation of the network configuration on the interface.
Help
reformetted
help : list available commands
f.read file : process commands from file
d.init : initialize (empty) dictionary
d.show
dictionary> {
}
d.add key [*#?%] val [v2,… ] (*=array, #=number, ?=boolean, %=hex data)
d.remove key
list [pattern] : list keys in data store
add key ["temporary"] : add key in data store w/current dict
get key : get dict from data store w/key
set key : set key in data store w/current dict
show key ["pattern"] : show values in data store w/key
remove key : remove key from data store
notify key : notify key in data store
notification keys:
n.list ["pattern"] : list
n.add key ["pattern"] : add
n.remove key ["pattern"] : remove
n.changes : list changed keys
n.watch : watch for changes
n.cancel : cancel notification requests
quit
reformatted
11/24/24
% scutil --dns
DNS configuration
resolver #1
search domain[0] : germans.com
nameserver[0] : 192.168.1.1
if_index : 14 (en0) flags : Request A records : 00020002 (Reachable, Directly Reachable Address)
domain options timeout flags reach order
resolver #2 : local : mdns : 5 : Request A records : 0(Not Reachable) : 300000
resolver #3 : 254.169.in-addr.arpa : mdns : 5 : Request A records : 0(Not Reachable) : 300200
resolver #4 : 8.e.f.ip6.arpa : mdns : 5 : Request A records : 0(Not Reachable) : 300400
resolver #5 : 9.e.f.ip6.arpa : mdns : 5 : Request A records : 0(Not Reachable) : 300600
resolver #6 : a.e.f.ip6.arpa : mdns : 5 : Request A records : 0(Not Reachable) : 300800
resolver #7 : b.e.f.ip6.arpa : mdns : 5 : Request A records : 0(Not Reachable) : 301000
DNS configuration (for scoped queries)
resolver #1
search domain[0] : germans.com
nameserver[0] : 192.168.1.1
if_index : 14 (en0) flags : Scoped, Request A records : 00020002 ( Reachable, Directly Reachable Address)
list
subKey [0] = Plugin:IPConfiguration
subKey [1] = Plugin:InterfaceNamer
subKey [2] = Plugin:KernelEventMonitor
subKey [3] = Setup:
subKey [4] = Setup:/
subKey [5] = Setup:/Network/Global/IPv4
subKey [6] = Setup:/Network/HostNames
subKey [7] = Setup:/Network/Interface/en0/AirPort
subKey [8] = Setup:/Network/Service/ uuid
subKey [9] = Setup:/Network/Service/uudi/IPv4
subKey [10] = Setup:/Network/Service/uudi/IPv6
subKey [11] = Setup:/Network/Service/uudi/Interface
subKey [12] = Setup:/Network/Service/uudi/Proxies
subKey [13] = Setup:/Network/Service/uudi
subKey [14] = Setup:/Network/Service/uudi/IPv4
subKey [15] = Setup:/Network/Service/uudi/IPv6
subKey [16] = Setup:/Network/Service/uudi/Interface
subKey [17] = Setup:/Network/Service/uudi/Proxies
subKey [18] = Setup:/Network/Service/uudi
subKey [19] = Setup:/Network/Service/uudi/IPv4
subKey [20] = Setup:/Network/Service/uudi/IPv6
subKey [21] = Setup:/Network/Service/uudi/Interface
subKey [22] = Setup:/Network/Service/uudi/Proxies
subKey [23] = Setup:/Network/Service/uudi
subKey [24] = Setup:/Network/Service/uudi/IPv4
subKey [25] = Setup:/Network/Service/uudi/IPv6
subKey [26] = Setup:/Network/Service/uudi/Interface
subKey [27] = Setup:/Network/Service/uudi/Proxies
subKey [28] = Setup:/Network/Service/uudi
subKey [29] = Setup:/Network/Service/uudi/IPv4
subKey [30] = Setup:/Network/Service/uudi/IPv6
subKey [31] = Setup:/Network/Service/uudi/Interface
subKey [32] = Setup:/Network/Service/uudi/Proxies
subKey [33] = Setup:/Network/Service/uudi
subKey [34] = Setup:/Network/Service/uudi/IPv4
subKey [35] = Setup:/Network/Service/uudi/IPv6
subKey [36] = Setup:/Network/Service/uudi/Interface
subKey [37] = Setup:/Network/Service/uudi/Proxies
subKey [38] = Setup:/System
subKey [39] = State:/IOKit/LowBatteryWarning
subKey [40] = State:/IOKit/PowerManagement/CurrentSettings
subKey [41] = State:/IOKit/PowerManagement/SystemLoad
subKey [42] = State:/IOKit/PowerManagement/SystemLoad/Detailed
subKey [43] = State:/Network/Global/DNS
subKey [44] = State:/Network/Global/IPv4
subKey [45] = State:/Network/Global/Proxies
subKey [46] = State:/Network/Global/SMB
subKey [47] = State:/Network/Interface
subKey [48] = State:/Network/Interface/anpi0/Link
subKey [49] = State:/Network/Interface/anpi0/LinkQuality
subKey [50] = State:/Network/Interface/anpi1/Link
subKey [51] = State:/Network/Interface/anpi1/LinkQuality
subKey [52] = State:/Network/Interface/anpi2/Link
subKey [53] = State:/Network/Interface/anpi2/LinkQuality
subKey [54] = State:/Network/Interface/ap1/AirPort
subKey [55] = State:/Network/Interface/ap1/Link
subKey [56] = State:/Network/Interface/ap1/LinkQuality
subKey [57] = State:/Network/Interface/awdl0/AirPort
subKey [58] = State:/Network/Interface/awdl0/IPv6
subKey [59] = State:/Network/Interface/awdl0/Link
subKey [60] = State:/Network/Interface/awdl0/LinkQuality
subKey [61] = State:/Network/Interface/bridge0/Link
subKey [62] = State:/Network/Interface/en0/AirPort
subKey [63] = State:/Network/Interface/en0/CaptiveNetwork
subKey [64] = State:/Network/Interface/en0/IPv4
subKey [65] = State:/Network/Interface/en0/IPv6
subKey [66] = State:/Network/Interface/en0/Link
subKey [67] = State:/Network/Interface/en0/LinkQuality
subKey [68] = State:/Network/Interface/en1/Link
subKey [69] = State:/Network/Interface/en1/LinkQuality
subKey [70] = State:/Network/Interface/en2/Link
subKey [71] = State:/Network/Interface/en2/LinkQuality
subKey [72] = State:/Network/Interface/en3/Link
subKey [73] = State:/Network/Interface/en3/LinkQuality
subKey [74] = State:/Network/Interface/en4/Link
subKey [75] = State:/Network/Interface/en4/LinkQuality
subKey [76] = State:/Network/Interface/en5/Link
subKey [77] = State:/Network/Interface/en5/LinkQuality
subKey [78] = State:/Network/Interface/en6/Link
subKey [79] = State:/Network/Interface/en6/LinkQuality
subKey [80] = State:/Network/Interface/llw0/IPv6
subKey [81] = State:/Network/Interface/lo0/IPv4
subKey [82] = State:/Network/Interface/lo0/IPv6
subKey [83] = State:/Network/Interface/lo0/LinkQuality
subKey [84] = State:/Network/Interface/utun0/IPv6
subKey [85] = State:/Network/Interface/utun1/IPv6
subKey [86] = State:/Network/Interface/utun2/IPv6
subKey [87] = State:/Network/Interface/utun3/IPv6
subKey [88] = State:/Network/MulticastDNS
subKey [89] = State:/Network/NetBIOS
subKey [90] = State:/Network/PrivateDNS
subKey [91] = State:/Network/Service/ uuid
subKey [92] = State:/Network/Service/ uuid /IPv6
subKey [93] = State:/Network/Service/ uuid
subKey [94] = State:/Network/Service/ uuid /IPv6
subKey [95] = State:/Network/Service/ uuid /DHCP
subKey [96] = State:/Network/Service/ uuid /DNS
subKey [97] = State:/Network/Service/ uuid /IPv4
subKey [98] = State:/Network/Service/ uuid /SMB
subKey [99] = State:/Network/Service/ uuid
subKey [100] = State:/Network/Service/ uuid /IPv6
subKey [101] = State:/Network/Service/ uuid
subKey [102] = State:/Network/Service/ uuid /IPv6
subKey [103] = State:/Network/mDNSResponder/DebugState
subKey [104] = State:/Users/ConsoleUser
subKey [105] = com.apple.DirectoryService.
NotifyTypeStandard:DirectoryNodeAdded
subKey [106] = com.apple.MobileBluetooth
subKey [107] = com.apple.opendirectoryd.node:/Contacts
subKey [108] = com.apple.opendirectoryd.node:/Search
subKey [109] = com.apple.sharing
subKey [110] = com.apple.sharing:/AutoUnlock/Enabled
subKey [111] = com.apple.sharing:/AutoUnlock/InProgress
subKey [112] = com.apple.smb
SEE ALSO
configd(8)
list of