#command-line #host #cli #cmd #file #name #line #hosts #hosts-file

app hostman

A cli manager for /etc/hosts

17 unstable releases (4 breaking)

0.5.2 Dec 8, 2019
0.5.1 Dec 6, 2019
0.4.0 Mar 17, 2019
0.3.2 Mar 17, 2019
0.1.8 Mar 3, 2019
Download history 1/week @ 2023-08-02 17/week @ 2023-08-16 18/week @ 2023-08-23 36/week @ 2023-09-06 1/week @ 2023-09-13 1/week @ 2023-09-20 2/week @ 2023-09-27 2/week @ 2023-10-04 10/week @ 2023-10-25 25/week @ 2023-11-01 19/week @ 2023-11-08

54 downloads per month

MIT license

637 lines


Build Status Crates.io

Hostman is a command line manager for /etc/hosts.


using cargo

cargo install hostman

Manual install

Download the latest release for your architecture from github and put it in a directory in your path.

Install script

You can use the trust install script to install this tool:

curl -LSfs https://japaric.github.io/trust/install.sh | \
    sh -s -- --git lucascaro/hostman


Run the tool to get a usage summary:


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:

$ hostman check localhost
# localhost is used to configure the loopback interface  localhost
::1  localhost

hostman add

Add a new host to your hosts file.

hostman add <ip> <names> [comment]...

hostman local

Add a new host to your hosts file, using as the ip.

hostman local <names> [comment]...

hostman remove

Remove a host from your hosts file.

hostman remove <host>

hostman disable

Disable (comment out) a host from your hosts file.

hostman disable <host>

hostman enable

Enable a commented out host from your hosts file.

hostman enable <host>

hostman update

Update the cli to the latest version.

hostman update


~621K SLoC