Results 1 to 5 of 5

Thread: Can I temporarily disable my hostfile ?

  1. #1
    Join Date
    Jun 2012
    Beans
    182

    Can I temporarily disable my hostfile ?

    I suppose this can't be actually done,however what I actually wanted to ask is whether I can temporarily disable all the entries added to my hostfile,in case I need to check if a specific website doesn't open exactly because of some line added to that hostfile.

    It has happened to me before,and going through the list manually commenting the lines that *could* prevent some website from loading is definitely annoying:I take a quick switch like sudo ufw disable/enable doesn't exist for the hostfile,right ?

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Can I temporarily disable my hostfile ?

    No. You would have to comment all the lines out - or just create a new hosts file with just the default entries.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Mar 2011
    Beans
    668

    Re: Can I temporarily disable my hostfile ?

    Rename it temporarily. You could do

    mv /etc/hosts /etc/hostess

    and to undo

    mv /etc/hostess /etc/hosts

  4. #4
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    7,909

    Re: Can I temporarily disable my hostfile ?

    Rename it, as described, but also be sure to make a new one with the default entries for localhost.

  5. #5
    Join Date
    Jun 2012
    Beans
    182

    Re: Can I temporarily disable my hostfile ?

    Yes,I should have thought about that...thanks.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •