lianghai
V2EX  ›  macOS

谁能给一下默认的 hosts 内容?

  •  
  •   lianghai · Aug 7, 2010 · 10054 views
    This topic created in 5784 days ago, the information mentioned may be changed or developed.
    Mac OS X 10.6.4

    安了 Gas Mask( http://code.google.com/p/gmask/ )之后,它把系统默认的 hosts 清空了……
    麻烦 Mac OS X 用户拷贝给我一份默认 hosts 文件的完整内容。多谢!
    9 replies    1970-01-01 08:00:00 +08:00
    dimlau
        1
    dimlau  
       Aug 7, 2010
    ##
    # Host Database
    #
    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ##
    127.0.0.1 localhost
    255.255.255.255 broadcasthost
    ::1 localhost
    fe80::1%lo0 localhost

    汗一下,这个是不是默认的不知道了,改过很多次,不过其他内容和这个之间有个空格,应该是我原来心思细腻故意留的吧,哈哈,所以,就贴这些了。
    dimlau
        2
    dimlau  
       Aug 7, 2010
    嗯,不是空格,是空行。
    xhacker
        3
    xhacker  
       Aug 7, 2010
    没有自己的主机名吗?
    lianghai
        4
    lianghai  
    OP
       Aug 7, 2010
    @xhacker 查证了一下,确实是 @dimlau 的这个。自己的主机名?
    xhacker
        5
    xhacker  
       Aug 7, 2010
    嗯,Ubuntu 里面有一条类似于“127.0.1.1 xhacker-toshiba-laptop”的东西,没有的话系统会出现问题……

    Mac OS X 没这事儿就无视我吧~
    lianghai
        6
    lianghai  
    OP
       Aug 7, 2010
    @xhacker 这个好玩,它是在什么情形下发挥作用的?
    ksky
        7
    ksky  
       Aug 7, 2010
    空的就可以,或者你可以加一个

    127.0.0.1 localhost
    dimlau
        8
    dimlau  
       Aug 7, 2010
    第一句不就是本地么……
    xhacker
        9
    xhacker  
       Aug 8, 2010
    @lianghai 呵呵,这个俺也不太清楚~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3350 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 11:01 · PVG 19:01 · LAX 04:01 · JFK 07:01
    ♥ Do have faith in what you're doing.