I've searched high and low for an answer to this with no luck. Please forgive me if this has been addressed before.
Until a month ago I was on KitKat on an old phone. Then I upgraded to the Nexus 6 with Lollipop. I'm currently on Android 5.1.1. When I was on KitKat on my old phone, I was able to run the shell command with root below to clear my phone's DNS cache:
ndc resolver flushdefaultif
Whenever I would run that command on KitKat, it would always output:
Resolver command succeeded.
But since being on Lollipop, running that same command always outputs:
500 0 Resolver command unknown.
I've even tried running the command:
ndc resolver flushif wlan0
and it outputs the same "Resolver command unknown" as with the other command.
Does anyone happen to know what the proper root shell command to clear Android DNS cache is on Lollipop? Because it appears that the old command I've been using isn't doing the job.
To Flush the DNS Cache: Type 'ipconfig /flushdns' in the Command Prompt, and press Enter. 3. The user has now flushed the DNS Cache and will receive a message that they have successfully done so. 4.
The easiest way to flush the DNS on Linux, if you are using systemd-resolved, is to use the “systemd-resolve” command followed by “–flush-caches”. Alternatively, you can use the “resolvectl” command followed by the “flush-caches” option.
Looks like it changed yet AGAIN for 7 Nougat:
ndc resolver clearnetdns <netId>
netId being the interface:
ndc resolver clearnetdns wlan0
200 0 Resolver command succeeded
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With