Skip to content
/ hosts Public
forked from xwmx/hosts

A command line tool for managing hosts file entries.

License

Notifications You must be signed in to change notification settings

hnioche/hosts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Hosts

Hosts is a script that helps managing the hosts file entries.

Installation

bpkg

To install with bpkg:

bpkg install hnioche/hosts

Manual

To install manually, simply add the hosts script to your $PATH. If you already have a ~/bin directory, you can use the following command:

curl -L https://raw.github.com/hnioche/hosts/master/hosts \
  -o ~/bin/hosts && chmod +x ~/bin/hosts

Usage

Usage:
  hosts set <hostname> <ip address>
  hosts rm <hostname>
  hosts group <group name> set <hostname 1> <hostname 2> ... <hostname n>
  hosts group <group name> + <hostname 1> <hostname 2> ... <hostname n>
  hosts group <group name> - <hostname 1> <hostname 2> ... <hostname n>
  hosts group <group name> rm
  hosts group <group name> <ip address>
  hosts group <group name> reset
  hosts group <group name>
  hosts -h | --help
  hosts --version

Options:
  --auto-sudo  Run write commands with `sudo` automatically.

Help:
  hosts help [<command>]

For full usage, run:

hosts help

For help with a particular command, try:

hosts help <command name>

Acknowledgements

About

A command line tool for managing hosts file entries.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%