📌  相关文章
📜  flush dns ubuntu 18.04 - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:00:47.511000             🧑  作者: Mango

Flush DNS in Ubuntu 18.04 - Shell-Bash

In Ubuntu 18.04, flushing DNS cache is useful when you encounter DNS issues such as incorrect or outdated DNS records.

Here's how you can flush DNS cache in Ubuntu 18.04 using Shell-Bash:

  1. Open the terminal using the "Ctrl + Alt + T" shortcut.
  2. Type the following command to flush the DNS cache:
sudo systemd-resolve --flush-caches
  1. Press "Enter" and enter your password if prompted.
  2. Verify that the DNS cache has been flushed by running the following command:
sudo systemd-resolve --statistics
  1. The output should show that the cache size is 0.
Cache Size (repeated queries): 0
Cache Size (unique domains): 0

That's it! You have successfully flushed DNS cache in Ubuntu 18.04 using Shell-Bash.

Remember to flush DNS cache only when necessary as it can affect the performance of your system.