Hostman is a command line manager for /etc/hosts
.
cargo
shell
cargo install hostman
Download the latest release for your architecture from github and put it in a directory in your path.
You can use the trust install script to install this tool:
shell
curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- --git lucascaro/hostman
Run the tool to get a usage summary:
shell
hostman
hostman show
Use this command to show your current hosts file.
hostman check
Use this command to check if a host is in your hosts file:
```shell $ hostman check localhost
127.0.0.1 localhost ::1 localhost ```
hostman add
Add a new host to your hosts file.
shell
hostman add <ip> <names> [comment]...
hostman remove
Remove a host from your hosts file.
shell
hostman remove <host>
hostman disable
Disable (comment out) a host from your hosts file.
shell
hostman disable <host>
hostman enable
Enable a commented out host from your hosts file.
shell
hostman enable <host>
hostman update
Update the cli to the latest version.
shell
hostman update