The bttf is a command-line tool for working with dates and times directly from the terminal. It supports time parsing, arithmetic, formatting, and other date and time operations, making it useful for shell scripts, automation, and other command-line tasks. This tutorial explains how to install bttf date and time tool on Ubuntu 26.04.
Install bttf
Retrieve the latest bttf release from GitHub and assign its version number to a variable:
BTTF_VERSION=$(curl -s "https://api.github.com/repos/BurntSushi/bttf/releases/latest" | grep -Po '"tag_name": "\K[0-9.]+')
Next, download the matching archive and place the bttf binary into /usr/local/bin:
curl -sSL https://github.com/BurntSushi/bttf/releases/latest/download/bttf-$BTTF_VERSION-x86_64-unknown-linux-musl.tar.gz \
| sudo tar xz --strip-components=1 -C /usr/local/bin --wildcards '*/bttf'
Confirm that the installation completed successfully by checking the bttf version:
bttf --version
Testing bttf
The bttf utility provides various operations for working with date and time. For example, the following commands obtain the current UTC time and display it using a specified format:
bttf time in UTC now | bttf time fmt -f '%Y-%m-%d %H:%M:%S'
The resulting output should look similar to:
2026-08-21 08:25:00
Uninstall bttf
If the bttf utility is no longer needed, its executable can be deleted as follows:
sudo rm -rf /usr/local/bin/bttf
Leave a Comment
Cancel reply