flush dns cache via command code example Example 1: flush dns cache linux sudo systemd-resolve --flush-caches Example 2: clearing dns cache ipconfig /flushdns