September 26

Linux: How to flush DNS in Ubuntu

Sometimes you need to see the changes that have been made on a DNS server, but these changes are stuck in your workstation DNS cache.

Similar to Windows ipconfig /flushdns you can flush your Linux computers DNS.
You must first install the name service cache daemon (nscd).  This is not usually installed by default.
After the install is complete you can simply restart the nscd as need to clean your DSN cache.

  1. sudo apt-get install nscd
  2. Flush DNS Cache in Ubuntu Using the following command
  3. sudo /etc/init.d/nscd restart

Copyright 2021. All rights reserved.

Posted September 26, 2011 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B