Hosts database manager for *NIX systems
A command line tool for managing the hosts database on UNIX systems. Requires
bash >= 4.2.
Often it makes sense when developing a web application to use the host name for development so you create a host file mapping to point the domain name to the local loopback address:
Then you put the application live so you comment out the entry:
But you still need to switch between the local development version and the live version regularly which is when editing the hosts file manually becomes tedious.
hosts(1) tool which lets you manage the host file as a set of blocks which can be easily switched on or off.
The man page for
hosts(1) is available via the command
hosts help or you can view the online version if you prefer.
By default the blocks and other files are stored in
$hosts_storage with this directory layout:
hosts ├── backup │ └── hosts ├── history │ └── hosts.1 ├── loopback │ └── hosts ├── blocks └── example.on
Verify you have
bash >= 4.2 using
bash --version. If you have an older version, you should update.
bake symlink to run the test suite:
You must have an active internet connection for all tests to pass as some tests query the database.