LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hostess

idempotent command-line tool for managing /etc/hosts

TLDR

Add a host entry
$ sudo hostess add [local.example.com] [127.0.0.1]
copy
Remove a host entry
$ sudo hostess rm [local.example.com]
copy
List all entries
$ hostess ls
copy
Enable a disabled entry
$ sudo hostess on [local.example.com]
copy
Disable an entry
$ sudo hostess off [local.example.com]
copy
Check if entry exists
$ hostess has [local.example.com]
copy

SYNOPSIS

hostess command [arguments]

DESCRIPTION

hostess is an idempotent command-line tool for managing /etc/hosts. It simplifies adding, removing, and toggling host entries for development and testing. Entries can be disabled without removal. Requires root/sudo on Unix or elevated prompt on Windows.

SUBCOMMANDS

add hostname ip

Add or update host entry.
rm hostname
Remove host entry.
ls
List all entries.
on hostname
Enable a disabled entry.
off hostname
Disable an entry.
has hostname
Check if entry exists.
fix
Reformat hosts file.

INSTALL

sudo pacman -S hostess
copy
brew install hostess
copy
nix profile install nixpkgs#hostess
copy

CAVEATS

Modifying /etc/hosts requires elevated privileges. Set HOSTESSPATH to override default hosts file location. Set HOSTESSFMT to 'windows' or 'unix' to override format detection.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid