Navigating through deeply nested directory hierarchies in the Linux terminal using standard commands like cd, ls, and tab completion can quickly become sluggish and repetitive. While terminal file managers like Ranger, Yazi, or Vifm provide complete file manipulation capabilities, they often feel too heavy when your sole objective is to jump swiftly between folders. The tere utility (a terminal directory navigator written in Rust) provides a focused, ultra-fast alternative: an interactive keyboard-driven browser that updates your shell’s working directory upon exit.
What Makes tere Different from Other Navigators?
Unlike traditional file managers, tere focuses purely on directory traversal and immediate shell integration:
- Direct Shell cd Integration: Exiting
terechanges your parent shell’s current working directory directly to the highlighted folder. - Interactive Tree Navigation: Displays folder trees with collapsible nodes and instant previews of subdirectory contents.
- Fuzzy Search Filtering: Type anywhere to filter folders instantly without remembering precise directory structures.
- Zero External Dependencies: Compiled as a single static Rust binary with near-zero latency even on massive filesystems.
Installing tere on Linux
You can install tere using precompiled binaries, package managers, or Cargo.
Method 1: Install via Cargo (Recommended for All Distributions)
If you have Rust and Cargo installed, compile tere directly from source:
# Ensure Rust and Cargo are available
cargo install tere
The compiled binary will be placed into ~/.cargo/bin. Ensure this directory is in your system PATH.
Method 2: Install via Precompiled GitHub Binary
For systems without a Rust toolchain, download the precompiled binary from the official releases:
# Download the latest x86_64 release archive
curl -sL https://github.com/mgunyho/tere/releases/latest/download/tere-x86_64-unknown-linux-musl.zip -o tere.zip
# Extract the archive
unzip tere.zip
# Move the executable to a global PATH directory
sudo mv tere /usr/local/bin/
sudo chmod +x /usr/local/bin/tere
Method 3: Arch Linux (AUR)
Arch users can install tere via the Arch User Repository:
yay -S tere
Configuring Shell Integration for Directory Hopping
By default, executing tere as a standalone executable cannot change the working directory of its parent shell session due to process isolation rules in POSIX operating systems. To allow tere to change directories upon exit, wrap it in a shell function.
Bash and Zsh Configuration
Add the following shell wrapper function to your ~/.bashrc or ~/.zshrc file:
# tere shell wrapper function
tere() {
local result=$(command tere "$@")
if [ -n "$result" ]; then
cd -- "$result"
fi
}
Reload your configuration:
# For Bash
source ~/.bashrc
# For Zsh
source ~/.zshrc
Fish Shell Configuration
For Fish users, create or edit ~/.config/fish/functions/tere.fish:
function tere
set --local result (command tere $argv)
if test -n "$result"
cd -- "$result"
end
end
Navigating Directories with tere
Once the wrapper is active, launch the tool by typing:
tere
You can also pass a starting folder path to initiate navigation from a specific location:
tere ~/projects/backend
Essential Keyboard Controls:
| Key / Shortcut | Action |
|---|---|
| j / Down Arrow | Move selection down to the next item |
| k / Up Arrow | Move selection up to the previous item |
| l / Right Arrow | Step into selected directory |
| h / Left Arrow | Step back into parent directory |
| Enter | Select folder, exit tere, and cd into it |
| Esc / q | Cancel navigation and remain in original directory |
| Type any letters | Filter folders using fuzzy matching |
| Ctrl + u | Clear current search filter |
Displaying Hidden Folders
To view hidden dot-directories (such as .config or .local):
tere --hidden
You can toggle hidden file visibility dynamically while running tere by pressing Ctrl + h.