Packages and Binaries:

hostsman

cross-platform command line tool for adding, removing or listing mappings in hosts file.

Installed size: 51 KB
How to install: sudo apt install hostsman

Dependencies:
  • python3
  • python3-colorama
  • python3-mock
  • python3-pygments
hostsman
root@kali:~# hostsman -h
usage: hostsman [-h] [-l | -c HOSTNAME [HOSTNAME ...] |
                -i HOSTNAME[:IP] [HOSTNAME[:IP] ...] |
                -r HOSTNAME [HOSTNAME ...]]

add, remove or list mappings in hosts file

options:
  -h, --help            show this help message and exit
  -l, --list            Show the content of hosts file
  -c, --check HOSTNAME [HOSTNAME ...]
                        Check if the host name existed in the host file
  -i, --insert HOSTNAME[:IP] [HOSTNAME[:IP] ...]
                        Insert HOSTNAME[:IP] mappings
  -r, --remove HOSTNAME [HOSTNAME ...]
                        Remove mapping for HOSTNAME from hosts file.

hosts file location: /etc/hosts

Updated on: 2025-May-20