百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

ghost

> 编程语言
开源

轻松创建、列出、删除和修改 /etc/hosts 条目 ...

727 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

轻松创建、列出、删除和修改 /etc/hosts 条目 ...

Ghost =====

一个宝石,可让您在 Linux 和其他基于 Unix 的操作系统中轻松创建、列出和修改本地主机名(还有更多内容)。

$ sudo ghost add staging-server.local 67.207.136.164 [添加] staging-server.local -> 67.207.136.164 $ ghost list 列表 2 主机: mydevsite.local -> 127.0.0.1 staging-server.local -> 67.207.136.164 $ sudo ghost delete mydevsite.local [删除] mydevsite.local $ sudo ghost delete_matching test [删除] test2.local [删除] test.local $ ghost list 清单 1 主机: staging-server.local -> 67.207.136.164 $ sudo ghost modify staging-server.local 64.233.167.99 [修改] staging-server.local -> 64.233.167.99 $ ghost list 清单 1 主机: staging-server.local -> 64.233.167.99

$ ghost export > some_file $ ghost empty [清空] 已完成。 $ ghost list 列出 0 个主机: $ ghost import some_file [添加] staging-server.local -> 64.233.167.99 $ ghost list 清单 1 主机: staging-server.local -> 64.233.167.99 使用 RVM 时,您需要在命令前添加 rvmsudo: $ rvmsudo ghost add mydevsite.local [添加] mydevsite.local -> 127.0.0.1 图书馆

还有一个库,可以在 Ruby 脚本中使用。ghost command 是库的一个包装程序。查看 bin/ghost 的源代码 了解如何使用该库。 安装

在某些情况下,可能需要使用 sudo,具体取决于您的设置(例如,使用 OS X 中附带的标准 Ruby)。

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言