For testing purposes, periodically disable the / etc / hosts file. How to ensure that he remained in place, but did not work?

    2 answers 2

    Open the file (this is for Ubuntu)

    sudo nano /etc/nsswitch.conf 

    and from the line

    hosts: files dns

    remove the word files

    hosts: dns

    After this, the hosts file will be canceled.

      I think, just rename the file by adding 1 character, for example.