Mac O’Clock

The best stories for Apple owners and enthusiasts

How to Flush DNS Cache on macOS and Linux

--

Photo by Goran Ivos on Unsplash

macOS

  1. Open the terminal window.

If you’re using Mac OS Sierra, X El Capitan, X Mavericks, X Mountain Lion, or X Lion, enter the following command:

sudo killall -HUP mDNSResponder

  1. To flush DNS cache on Mac OS X Yosemite, enter the statement:

sudo discoveryutil udnsflushcaches

Linux

  1. Ubuntu does not cache DNS entries. However, if you have manually installed a DNS service, such as name service caching daemon then you can periodically flush the DNS cache. The method provided below will show you how you can flush your DNS cache.
  2. Press Ctrl+Alt+T together to open the terminal window.
  3. The next step is to enter the following command to clear DNS cache files on init.d subdirectory:

sudo /etc/init.d/nscd restart

--

--

Mac O’Clock
Mac O’Clock

Published in Mac O’Clock

The best stories for Apple owners and enthusiasts

Akkireddy
Akkireddy

Written by Akkireddy

#DevOps — #AWS — #Cloud enthusiast.. Views are my own.

No responses yet