Bash script allows you to interactively change the hostname of a machine running Debian-based systems, or macOS.
change_hostname.sh
→ command-line interface
change_hostname_tui.sh
→ text-based user interface via Whiptail.
change_hostname_tui.sh
requires Whiptail.
You may install the package via:
- apt with:
sudo apt-get install --yes whiptail
- brew with:
brew install newt
As ROOT, call the script with: bash change_hostname.sh
or bash change_hostname_tui.sh
, then follow on screen prompts, e.g.:
v.0.1 12-DEC-2015
v.0.2 23-DEC-2023