Flush DNS

Step 1: Open the Terminal
Navigate to Applications -> Utilities -> Terminal

Step 2: Flush DNS – Type the following command and hit enter.
Mac OS X Yosemite and later


sudo killall -HUP mDNSResponder

Mac OS X Yosemite v10.10 through v10.10.3

sudo discoveryutil mdnsflushcache

Mac OS X Mavericks, Mountain Lion and Lion

sudo killall -HUP mDNSResponder

Mac OS X Snow Leopard

sudo dscacheutil -flushcache

Hostname, ComputerName, LocalHostName

Setting Hostname, ComputerName, LocalHostName

Example:

scutil --set HostName yosemite.local
scutil --set ComputerName yosemite
scutil --set LocalHostName yosemite

scutil --get LocalHostName yosemite

notes: flush directory service cache

scutil –set HostName yosemite.local && scutil –set ComputerName yosemite && scutil –set LocalHostName yosemite

host

NAME
host – DNS lookup utility

how to easily test forward DNS when diagnosing Active Directory (AD) issues.

Example:

host apple.com

link:

Code:
host apple.com

[textbox rows=”3″]host apple.com[/textbox] to lookup.

how to easily test reverse DNS when diagnosing Active Directory (AD) issues.

Example:

host 17.142.160.59

link:

Code:
host 17.142.160.59

[textbox rows=”3″]host 17.142.160.59[/textbox] to lookup.