Install:
- Ubuntu
- Fedora
- Gentoo
- CentOS
- openSUSE
- RHEL
- Debian
- Mint
- Alpine Linux
- Arch Linux
- Milis Linux
- Manjaro Linux
- Scientific Linux
- Haiku OS
- macOS
- nix package manager
- Guix package manager
- MPR package manager
Build:
- build on any Linux distro
- build snap
- build on Ubuntu
- build on Debian
- build on Fedora
- build on Windows Subsystem for Linux (WSL)
- build on Cygwin
- build on macOS
Tarball:
Upgrade:
Install HSTR using a package or repository.
HSTR is included in Ubuntu 21.10 and newer releases:
sudo apt install hstr
Install HSTR on Ubuntu 21.04 and older using one-liner:
sudo add-apt-repository ppa:ultradvorka/ppa && sudo apt-get update && sudo apt-get install hstr && hstr --show-configuration >> ~/.bashrc && . ~/.bashrc
... or step by step:
sudo add-apt-repository ppa:ultradvorka/ppa
sudo apt-get update
sudo apt-get install hstr
Configure HSTR and check its man page.
HSTR is included in Debian 11 and newer releases:
sudo apt install hstr
Install HSTR on Debian 10 and older from my PPA. Add PPA, trust GPG key and install HSTR:
# add PPA to APT sources:
sudo bash -c 'echo -e "\ndeb https://www.mindforger.com/debian stretch main" > /etc/apt/sources.list.d/mindforger.list'
# import PPA's GPG key
wget -qO - https://www.mindforger.com/gpgpubkey.txt | sudo apt-key add -
# update sources
sudo apt update
# install HSTR
sudo apt install hstr
Configure HSTR and check its man page.
Alternatively you can download and install .deb
archive from GitHub releases
section of the project:
wget -O hstr.deb https://github.com/dvorka/hstr/releases/download/<major>.<minor>/hstr_<major>.<minor>.<revision>-1_amd64.deb
# dependencies:
apt-get install libncursesw5 libtinfo5
sudo dpkg -i hstr.deb
Install HSTR on Fedora, RHEL, CentOS or Scientific Linux:
sudo dnf install hstr
... or:
sudo yum install hstr
Configure HSTR and check its man page.
If you want to make sure you have the latest version, then download .rpm
archive from
GitHub releases or pkgs.org and install it:
sudo dnf install ./hstr-<major>.<minor>.<revision>-2.x86_64.rpm
To install HSTR on openSUSE, please check software.opensuse.org or pkgs.org. You can install HSTR as follows:
zypper addrepo https://download.opensuse.org/repositories/home:lemmy04/openSUSE_Leap_15.1/home:lemmy04.repo
zypper refresh
zypper install hstr
Configure HSTR and check its man page.
To install HSTR on Gentoo run (HSTR has been added to Portage):
emerge app-shells/hstr
Configure HSTR and check its man page.
To install HSTR on Alpine Linux run the following command as root:
apk add hstr
Configure HSTR and check its man page.
To install HSTR on ALT Linux, please check pkgs.org. You can install HSTR as follows:
rpm [p10] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/p10 x86_64 autoimports
rpm [p10] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/p10 noarch autoimports
sudo apt-get update
sudo apt-get install hstr
Configure HSTR and check its man page.
To install HSTR on Arch or Manjaro Linux download the latest distribution either from pkgs.org or GitHub releases.
Use PKGBUILD in the root of the distribution to build package using makepkg
.
To install HSTR from the Arch User Repository (AUR) run yaourt -S hstr-git
in command line.
To install HSTR on FreeBSD, please check pkgs.org. You can install HSTR as follows:
pkg install hstr
Configure HSTR and check its man page.
To install HSTR on Slackware, please check pkgs.org. You can install HSTR as follows:
upgradepkg --install-new hstr-<major>.<minor>-x86_64-1cf.txz
Configure HSTR and check its man page.
To install HSTR on Void Linux, please check pkgs.org. You can install HSTR as follows:
xbps-install -Su hstr
Configure HSTR and check its man page.
To install HSTR on Milis Linux run the following commands as root:
mps kur hstr
Configure HSTR and check its man page.
To install HSTR on Haiku OS use Haiku Depot:
Configure HSTR and check its man page.
Install HSTR on macOS using Homebrew (formula):
brew install hstr
You can also install HSTR on macOS using MacPorts (port info):
sudo port install hstr
Configure HSTR and check its man page.
To install HSTR using the nix package manager e.g. on NixOS you can use the nix derivation for HSTR:
nix profile install nixpkgs#hstr
Configure HSTR and check its man page.
To install HSTR in GuixSD or using the standalone Guix package manager you can install the hstr
package, e.g.
guix package -i hstr
Configure HSTR and check its man page.
To install HSTR in Ubuntu or derivative operating systems using MPR, you can search for hstr-git
using helper
or install it manually using makedeb -s
Configure HSTR and check its man page.
Build HSTR from source code.
Clone Git repository:
git clone https://github.com/dvorka/hstr.git
Create build files using:
cd ./build/tarball && ./tarball-automake.sh && cd ../..
Build and install HSTR using:
./configure && make && make install
Configure HSTR and check its man page.
To build snap for HSTR first clone Git repository:
git clone https://github.com/dvorka/hstr.git
Make sure that you can build HSTR from source code as described in a "Build on ..." section for your distribution.
Install snapcraft and build snap by running snapcraft in the root of Git repository:
$ ls ./snap
snapcraft.yaml
$ snapcraft
...
Find hstr_0+git..._amd64.snap
in the current directory.
To build HSTR on Ubuntu clone Git repository:
git clone https://github.com/dvorka/hstr.git
Install dependencies:
sudo apt install automake gcc make libncursesw5-dev libreadline-dev
Create build files using:
cd ./build/tarball && ./tarball-automake.sh && cd ../..
Build and install HSTR using:
./configure && make && make install
Configure HSTR and check its man page.
To build HSTR on Debian clone Git repository:
git clone https://github.com/dvorka/hstr.git
Install dependencies:
sudo apt install autotools gcc make pkgconf libncursesw5-dev libreadline-dev
Create build files using:
cd ./build/tarball && ./tarball-automake.sh && cd ../..
Build and install HSTR using:
./configure && make && make install
Configure HSTR and check its man page.
To build HSTR on Fedora clone Git repository:
git clone https://github.com/dvorka/hstr.git
Install dependencies:
sudo dnf install autotools ncurses-devel readline-devel
Create build files using:
cd ./build/tarball && ./tarball-automake.sh && cd ../..
Build and install HSTR using:
./configure && make && make install
Configure HSTR and check its man page.
To build HSTR on Windows Subsystem for Linux (WSL) clone Git repository:
git clone https://github.com/dvorka/hstr.git
Install dependencies:
sudo apt install automake gcc make libncursesw5-dev libreadline-dev
Create build files using:
cd ./build/tarball && ./tarball-automake.sh && cd ../..
Build and install hstr
using:
./configure && make && make install
It's important to finish installation by configuration of HSTR binding which ensures propagation of chosen command to the prompt:
hstr --show-configuration >> ~/.bashrc
. ~/.bashrc
Make sure to run HSTR using Ctrl-r (or hstrwsl
) - otherwise commands will not appear in prompt.
Configure HSTR and check its man page.
To build HSTR on Cygwin clone Git repository:
git clone https://github.com/dvorka/hstr.git
Create build files using:
cd ./build/tarball && ./tarball-automake.sh && cd ../..
Build and install HSTR using:
./configure && make && make install
It's important to finish installation by configuration of HSTR binding which ensures propagation of chosen command to the prompt:
hstr --show-configuration >> ~/.bashrc
. ~/.bashrc
Make sure to run HSTR using Ctrl-r (or hstrcygwin
) - otherwise commands will not appear in prompt.
Configure HSTR and check its man page.
HSTR can be built on macOS either using MacPorts or Homebrew.
To build HSTR using MacPorts install readline
and ncurses
:
port install readline
port install ncurses
Check portfile
either on macports.com or GitHub:
autoreconf -fvi
./configure CFLAGS=-I/opt/local/include/ LDFLAGS=-L/opt/local/lib
make
Configure HSTR and check its man page.
To build HSTR using Homebrew:
autoreconf -fvi
./configure CFLAGS=-I$(brew --prefix)/opt/readline/include LDFLAGS=-L$(brew --prefix)/opt/readline/lib
make
Configure HSTR and check its man page.
Download and install HSTR tarball.
Download latest tarball from GitHub releases section. Expand the archive and install HSTR using:
./configure && make && make install
Configure HSTR and check its man page.
HSTR major versions upgrades instructions.
Upgrade HSTR using a package or repository. If you are HSTR 1.x
user, please read about HSTR 2.x changes.
TIOCSTI
is an acronym for "Terminal Input Output Control STack Input",
and it is a system call used in Unix-like operating systems. The TIOCSTI
system call allows to insert data into the input buffer of a terminal
as if it had been typed by the user.
TIOCSTI
is NOT available at:
- Linux kernel >=6.2.0
- Cygwin
- WSL
HSTR uses TIOCSTI
to insert a command chosen by the user in HSTR
to shell prompt - if TIOCSTI
is available. Otherwise shell specific
line editors features are used.
Therefore it is important to configure HSTR after the installation: