mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(osx): add commands to check the dns
This commit is contained in:
@@ -61,6 +61,9 @@ lsof -nt -i ':443'
|
|||||||
# Clear the DNS cache.
|
# Clear the DNS cache.
|
||||||
sudo dscacheutil -flushcache; sudo killall -HUP 'mDNSResponder'
|
sudo dscacheutil -flushcache; sudo killall -HUP 'mDNSResponder'
|
||||||
|
|
||||||
|
# Resolve names.
|
||||||
|
dscacheutil -q 'host' -a 'name' 'hostname.or.fqdn'
|
||||||
|
|
||||||
|
|
||||||
# Check NFS shares are available on the network.
|
# Check NFS shares are available on the network.
|
||||||
showmount -e 'host'
|
showmount -e 'host'
|
||||||
@@ -117,6 +120,15 @@ defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server' 'N
|
|||||||
/usr/libexec/PlistBuddy -c "Print :NetBIOSName" \
|
/usr/libexec/PlistBuddy -c "Print :NetBIOSName" \
|
||||||
'/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist'
|
'/Library/Preferences/SystemConfiguration/com.apple.smb.server.plist'
|
||||||
|
|
||||||
|
# Get the DNS configuration.
|
||||||
|
scutil --dns
|
||||||
|
|
||||||
|
# Get the proxy configuration.
|
||||||
|
scutil --proxy
|
||||||
|
|
||||||
|
# Get network information.
|
||||||
|
scutil --nwi
|
||||||
|
|
||||||
|
|
||||||
# Get environment variables from inside launchd.
|
# Get environment variables from inside launchd.
|
||||||
launchctl getenv 'key'
|
launchctl getenv 'key'
|
||||||
@@ -408,8 +420,6 @@ To use any of these key combinations, press and hold the keys immediately after
|
|||||||
[resize, rotate, or flip an image in preview on mac]: https://support.apple.com/guide/preview/resize-rotate-or-flip-an-image-prvw2015/11.0/mac/13.0
|
[resize, rotate, or flip an image in preview on mac]: https://support.apple.com/guide/preview/resize-rotate-or-flip-an-image-prvw2015/11.0/mac/13.0
|
||||||
|
|
||||||
<!-- In-article sections -->
|
<!-- In-article sections -->
|
||||||
[further readings]: #further-readings
|
|
||||||
|
|
||||||
<!-- Knowledge base -->
|
<!-- Knowledge base -->
|
||||||
[defaults]: defaults.md
|
[defaults]: defaults.md
|
||||||
[ghostscript]: ../ghostscript.md
|
[ghostscript]: ../ghostscript.md
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#!sh
|
#!sh
|
||||||
|
|
||||||
|
# Set the host's name.
|
||||||
scutil --set 'ComputerName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
|
scutil --set 'ComputerName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
|
||||||
scutil --set 'HostName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
|
scutil --set 'HostName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
|
||||||
scutil --set 'LocalHostName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
|
scutil --set 'LocalHostName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
|
||||||
|
|
||||||
|
# Clear the DNS cache.
|
||||||
|
sudo dscacheutil -flushcache; sudo killall -HUP 'mDNSResponder'
|
||||||
|
|||||||
Reference in New Issue
Block a user