Display DNS cache

Sapir

New Member
Joined
Dec 2, 2020
Messages
14
Reaction score
1
Credits
122
Hi everyone!
I have a question about DNS cache . I've tried to see dns cache records in linux with the command similar to windows and with no success. After quick search i saw that i need NSCD daemon And after that Run the command service nscd status or sudo service nscd status But it dose'nt work!

So i wanted to ask .. How can i display dns records in linux? I know that in windows i can display it in : ipconfig/displaydns So i wanted to know how can i do this in linux command line?

Thank you in advanced:)
 


Tnx!!
Do you know/have link about how to delete dns?(equivalent to flushdns in windows)
 
This answer should do the trick:

 
I have try this, and "Current Cache Size: 0" but when i run this commands :

$sudo systemd-resolve --flush-caches
and then:

$sudo killall -USR1 systemd-resolved
$sudo journalctl -u systemd-resolved > ~/dns-cache.txt

i still get in "dns-cache.txt" sites that i have been visit month ago..
it's the only way to do that?
 
Last edited:
I have try this, and "Current Cache Size: 0" but when i run this commands :

$sudo systemd-resolve --flush-caches
and then:

$sudo killall -USR1 systemd-resolved
$sudo journalctl -u systemd-resolved > ~/dns-cache.txt

i still get in "dns-cache.txt" sites that i have been visit month ago..
it's the only way to do that?
Excellent question about DNS Cache! Thanks for bringing it up.

I don't have an answer - but an observation.

When you visit a site from a month ago, is it possible that your machine reaches out to the nearest DNS Resolver and refreshes the local DNS Cache? This would happen very quickly.

Perhaps after clearing out the local DNS Cache it is refreshed whenever trying to reach any site.

Just throwing that out there. ¯\_(ツ)_/¯
 

Members online


Top