flush dns cache linux 1

flush dns cache linux

sudo systemd-resolve --flush-caches

Here is what the above code is Doing:
1. We’re using the subprocess module to run the command line command.
2. We’re using the shell=True argument to tell the subprocess module to run the command in the shell.
3. We’re using the check_output() function to run the command and store the output in a variable.
4. We’re using the decode() function to convert the output from bytes to a string.
5. We’re using the print() function to print the output.

Similar Posts