Akagi201
V2EX  ›  问与答

求 mac/linux 下 hosts 管理软件

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

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

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

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

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

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

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

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

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