ubuntu flush dns cache 18.04 code example
Example 1: flush dns ubuntu 18.04
sudo systemd-resolve --flush-caches
Example 2: flush dns ubuntu 18.04
sudo systemctl restart nscd
sudo systemd-resolve --flush-caches
sudo systemctl restart nscd