Skip to the content.

Networking

ifconfig netstat -nr -f inet: show the routing table (ipv4)

netstat

netstat is a cross platform command existing in Unix, Linux, Mac and Windows but nearly all of them have different options/switches/parameters

scutil --dns | grep 'nameserver': Show the name servers

Admin

su <username who has admin rights>

Hardware

sudo powermetrics --samplers smc |grep -i "CPU die temperature"
sudo powermetrics --samplers smc |grep -i "GPU die temperature"
sudo powermetrics --samplers smc -i1 -n1: a single instant sample of SMC sensor readings, including CPU and GPU temprature and fan speed

https://apple.stackexchange.com/questions/54329/can-i-get-the-cpu-temperature-and-fan-speed-from-the-command-line-in-os-x

Directory Services

dscacheutil

Ref: https://ss64.com/mac/dscacheutil.html

References

https://ss64.com/mac/
Advanced macOS Command-Line Tools