https://github.com/tschaefer/ruby-hosts
:ticket: Query and control the system hosts file.
https://github.com/tschaefer/ruby-hosts
cmdline hosts linux ruby
Last synced: 4 months ago
JSON representation
:ticket: Query and control the system hosts file.
- Host: GitHub
- URL: https://github.com/tschaefer/ruby-hosts
- Owner: tschaefer
- License: mit
- Created: 2022-08-27T09:41:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T04:19:04.000Z (8 months ago)
- Last Synced: 2024-11-16T09:20:16.680Z (6 months ago)
- Topics: cmdline, hosts, linux, ruby
- Language: Ruby
- Homepage:
- Size: 67.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hostsctl
**hostsctl** - Query and control the system hosts file.
## Introduction
**hostsctl** may be used to query and change the system hosts file entries,
local and remote.* list entries
* add new entry
* remove entry
* set hostname of existing entry
* add and remove alias of existing entry## Installation
$ gem build
$ gem install -g
$ gem install hosts-$(ruby -Ilib -e 'require "hosts/version"; puts Hosts::VERSION').gem## Usage
For usage of command line tool `hostsctl` see following help output.
Usage:
hostsctl [OPTIONS] SUBCOMMAND [ARG] ...Parameters:
SUBCOMMAND subcommand
[ARG] ... subcommand argumentsSubcommands:
add add new hosts entry
add-alias add list of aliases to hosts entry
list list all hosts entries
remove remove hosts entry
remove-alias remove list of aliases from hosts entry
set-hostname set hostname of hosts entryOptions:
-h, --help print help
-m, --man show manpage
-v, --version show version
-f, --file FILE hosts file (default: system file)
-H, --host [USER@]HOST operate on remote hostFor API documentation use `rake doc`.
## License
[MIT License](https://spdx.org/licenses/MIT.html).
## Is it any good?
[Yes](https://news.ycombinator.com/item?id=3067434)