Akagi201
V2EX  ›  问与答

求 mac/linux 下 hosts 管理软件

  •  
  •   Akagi201 · Jun 3, 2015 · 4892 views
    This topic created in 4183 days ago, the information mentioned may be changed or developed.

    有时候会被其他软件不小心清掉hosts, 导致损失惨重.

    调研了下, 没法在home目录进行针对当前用户来配置.

    有什么好的管理办法, 能用git管理也行.

    13 replies  •  2015-12-28 23:19:57 +08:00
    lingo233
    lingo233
    Jun 3, 2015
    1
    cp hosts hosts~
    MajestySolor
    MajestySolor
    Jun 3, 2015
    2
    搭车同问 windows 下类似的软件或者 git 管理方案
    run2
    run2
    Jun 3, 2015
    3
    还真没试过 ln的行不?
    Busy
    Busy
    Jun 4, 2015❤️1
    4
    将你更新 hosts 的命令串成脚本不就可以了?
    kongkongyzt
    kongkongyzt
    Jun 4, 2015❤️1
    5
    SwitchHosts 地址:https://github.com/oldj/SwitchHosts

    IHost也不错 地址:http://pan.baidu.com/s/1hqtPjGK

    有趣的是,这两个好像都是A厂的前端工程师写的
    Akagi201
    Akagi201
    OP
    Jun 4, 2015
    6
    @kongkongyzt 十分感谢, 有空测试下
    zeayes
    zeayes
    Jun 4, 2015
    7
    mac 下的 Gas Mask
    zjia8765
    zjia8765
    Jun 4, 2015
    8
    Gas Mask 很不错
    jfdnet
    jfdnet
    Jun 4, 2015
    9
    GAS MASK 主程序3.6M 上面推荐的那两个安装文件都是30好几M的。怎么需要做到那么大。
    oldj
    oldj
    Dec 28, 2015❤️1
    10
    @jfdnet 现在 SwitchHosts! 只有 1.4M 了。😆

    http://oldj.github.io/SwitchHosts/
    Akagi201
    Akagi201
    OP
    Dec 28, 2015
    11
    @oldj 这东西不能做成命令行版本吗? 感觉不是很复杂啊
    Akagi201
    Akagi201
    OP
    Dec 28, 2015
    12
    @oldj 提交到 homecask 吧, 然后就可以 brew cask install switchhosts 安装管理了.
    oldj
    oldj
    Dec 28, 2015
    13
    @Akagi201 话说,写这个程序,就是为了用 UI 管理 hosts 方案啊…… 😂

    如果非要用命令行的话,以前我写过一个切换 hosts 的 vim 配置方案,其实可以用在命令行下面: http://oldj.net/article/switch-hosts-with-vim/ 。😄
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5114 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 02:09 · PVG 10:09 · LAX 18:09 · JFK 21:09
    ♥ Do have faith in what you're doing.