The Hostfile script is a simple utility that allows you to:
- Add IP addresses and domain(s) to your
/etc/hostsfile. - Remove domain(s) from
/etc/hosts. - Group multiple domains on a single line for cleaner management.
- Run the script without needing
sudoevery time using SUID.
1. hostfile <IP> <DOMAIN> [ADDITIONAL_DOMAINS...] (Add entry for domain)
2. hostfile -R <DOMAIN> (Remove entry for domain)
3. hostfile -h | --h | --help (Show this help message)
To install the Hostfile script, simply run the following one-liner:
curl -s https://raw.githubusercontent.com/Rezy-Dev/Hostfile/refs/heads/main/install.sh | sudo bashThis will clone the repository, move the script to /usr/bin/, and make it executable without needing sudo each time.
Note: To know what the script does, visit the install.sh script and read it.