In Linux, using a Bash Terminal, I can do:
hostname -d
to display the name of the DNS domain, andhostname -i
to display the network address(es) of the hostname .
How can I retrieve the same information--preferably using a single command (with option, if needed), and without having to elevate privileges--from a Bash terminal in Mac OS X?
For reference, here's the Bash Version I'm using in Mac OS X:
- GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15) .