Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TERMINALS HELPS
- Clear DNS Cache in OS X Yosemite 10.10.4 & OS X 10.10.5
- From OS X 10.10.4 moving onward to 10.10.5, including 10.11, Apple has ditched discoveryd and has replaced it (or rather, reverted back to) mDNSResponder. Thus, to clear DNS caches in OS X Yosemite 10.10.4, and 10.11 El Capitan, and presumably onward, the command string is as follows:
- sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed
- _____________________________________________________
- Step 1: Launch Terminal, found in /Applications/Utilities/ or launched through Spotlight
- Step 2: Type the following command at the prompt to backup hosts file to documents folder:
- sudo cp /private/etc/hosts ~/Documents/hosts-backup
- Step 3: Type the following command at the prompt to open hosts file:
- sudo nano /private/etc/hosts
- Step 4: Enter the administrator password when requested, you will not see it typed on screen as usual with the command line
- Step 5: Once the hosts file is loaded within nano, use the arrow keys to navigate to the bottom of the hosts file to make your modifications
- Step 6: When finished, hit Control+O followed by ENTER/RETURN to save changes to /private/etc/hosts, then hit Control+X to exit out of nano
- Step 7: Verify your hosts modifications. You may need to clear DNS cache first.
- If you want to restore the modified hosts to the backup of the original file use this command:
- sudo cp ~/Documents/hosts-backup /private/etc/hosts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement