HTB
HTB is an acronym for "herzbube's toolbox". The HTB is a collection of useful programs, usually bash shell scripts, that I (herzbube) originally created in the 1990'ies for making my work-related tasks as an SCO Unix sysadmin a little bit more comfortable. Since then I have adapted the collection to run on Debian Linux and macOS, and I have added a few more scripts that help me with administrating my household IT environment.
This page shows how I integrate the HTB into the shell environment of any UNIX-y machine (macOS, Linux).
References
- Git repository: https://github.com/herzbube/htb
- Consult the README at the repository root folder, it explains how to set up HTB on a machine.
Filesystem location
The HTB default is to install everything in /usr/local
. Instead, I prefer an independent setup where the HTB is not intermingled with other stuff in /usr/local
. The installation process thus becomes a simple git clone operation into
/usr/local/htb
Cloning the Git repo
This creates a read-only clone of the HTB repository:
cd /usr/local git clone https://github.com/herzbube/htb.git
Shell integration
System-wide
In order to have the HTB available for every user, it can be set up system-wide by manipulating files in /etc
.
This is necessary for login shells:
# cat /etc/profile.d/htb.sh . /usr/local/htb/etc/htb-profile.sh
For subshells the following must be added to /etc/bash.bashrc
:
HTB_BASE_DIR=/usr/local/htb . $HTB_BASE_DIR/etc/htb-bashrc.sh
Individual users
For individual users, the files to edit are
~/.profile
(for bash) or~/.zprofile
(for zsh)~/.bashrc
(for bash) or~/.zshrc
(for zsh)
macOS
See the macOS installation wiki page.