You want to flush your DNS cache in linux? Well it is very very easy :]
Let's say you use systemd-resolve:
easy!
$ systemd-resolve --flush-caches
Let's say you use anything else (nscd, dnsmasq, named etc)
easier!
just restart the service
$ systemctl restart nscd (or dnsmasq, named etc)
or if you do not use systemd, you could try
service nscd restart
cheers!
PS: you probably need to have root privileges to execute the above commands