How to Install fzf on Ubuntu: The Command-Line Fuzzy Finder
fzf is a general-purpose command-line fuzzy finder. Feed it any list on standard input, filenames, branches, running processes, shell history, and it lets you filter interactively with fuzzy matching before printing your selection to standard output. Because that interface is so minimal, fzf slots into practically any command pipeline and turns it into an interactive picker.
Ubuntu carries an fzf package, but the archive version often lags upstream, and older builds lack the recent flags, preview behaviour and shell integration niceties that make fzf a joy to use. The project moves fast, so a current build is worth having.
The unofficial deb.griffo.io repository ships an up-to-date fzf as a proper Ubuntu .deb, installable and upgradable with APT alongside everything else on your system.
What Makes fzf Special?
- 🔍 Fuzzy matching - A handful of scattered characters is enough to surface the match you want.
- ⚡ Blazing fast - The Go implementation stays snappy across enormous lists.
- 🪟 Live preview window - Show file contents, diffs or command output next to the results.
- ⌨️ Shell key-bindings -
CTRL-T,CTRL-RandALT-Cbring fuzzy files, history and directory jumps to your shell. - 🔧 Completion integration - Fuzzy-complete arguments with the
**<TAB>trigger. - 🧩 Endlessly composable - Any list piped in becomes an interactive selection.
- 🎨 Fully themeable - Colours, borders, layout and preview are all tunable.
- 🖱️ Multi-select - Select several entries at once with
TAB.
Why Use the deb.griffo.io Repository?
- Easy installation and updates through APT.
- Automatic dependency management provided by the Ubuntu packaging.
- Always tracks upstream releases so you get the newest fzf features.
- No compiling from source and no Go toolchain to install.
- Works across supported Ubuntu releases, with the codename detected automatically.
Prerequisites
Make sure you have:
- An Ubuntu system (Jammy 22.04 LTS, Noble 24.04 LTS, or newer)
sudoprivilegescurlinstalled (sudo apt install curlif needed)
Step 1: Add the deb.griffo.io Repository
Register the key and repository source:
# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings
# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
# Update the package list
sudo apt update
Step by step:
- Create the keyrings directory - guarantees
/etc/apt/keyringsexists with sensible permissions. - Install the GPG key - fetches the key and de-armours it into a dedicated keyring so APT can check signatures.
- Add the repository - writes a
signed-bysource line, withlsb_release -scdetecting your Ubuntu codename. - Update the package list - refreshes APT’s package index.
Step 2: Update the Package List
If you did not run the last command, refresh now:
sudo apt update
Step 3: Install fzf
Install with APT:
sudo apt install fzf
APT installs the fzf binary along with its shell integration scripts.
Step 4: Verify the Installation
The binary is fzf. Confirm the version:
fzf --version
You should see something like:
0.54.3 (a1b2c3d)
Type fzf on its own to launch an interactive finder over the current directory tree.
Getting Started with fzf
Enabling Shell Key-Bindings and Completion
Start with the shell integration, since that is where fzf earns its keep. Recent fzf builds provide a one-line generator, which is the simplest option on Ubuntu. Add to ~/.bashrc:
# Bash integration (fzf 0.48+)
eval "$(fzf --bash)"
If you prefer the packaged example scripts, they live under /usr/share/doc/fzf/examples:
[ -f /usr/share/doc/fzf/examples/key-bindings.bash ] && source /usr/share/doc/fzf/examples/key-bindings.bash
[ -f /usr/share/bash-completion/completions/fzf ] && source /usr/share/bash-completion/completions/fzf
Open a new terminal and you get three bindings:
- CTRL-T - insert a fuzzy-selected path onto the command line.
- CTRL-R - fuzzy-search through your command history.
- ALT-C - fuzzy-pick a directory and
cdinto it.
Fuzzy Completion with **
With completion active, use the ** trigger followed by TAB:
# Complete a file path fuzzily
cat **<TAB>
# Complete an environment variable to unset
unset **<TAB>
# Complete a host for ssh
ssh **<TAB>
Piping Any List Through fzf
The underlying pattern is list in, choice out:
# Pick a file and open it
nvim "$(fzf)"
# Fuzzy-select and kill a process
kill -9 "$(ps -ef | fzf | awk '{print $2}')"
# Choose a Git commit to show
git log --oneline | fzf | awk '{print $1}' | xargs git show
Preview Windows
Add a preview command to inspect entries before choosing:
# Simple content preview
fzf --preview 'cat {}'
# Syntax-highlighted preview with bat
fzf --preview 'bat --style=numbers --color=always {}' --preview-window=right:60%
Setting Persistent Defaults
Configure fzf globally through environment variables in your shell config:
export FZF_DEFAULT_OPTS="--height 50% --layout=reverse --border=rounded --marker='*'"
export FZF_CTRL_T_OPTS="--preview 'bat --color=always {}'"
Keeping fzf Updated
fzf follows your normal Ubuntu update cycle:
sudo apt update && sudo apt upgrade
Whenever deb.griffo.io ships a newer fzf, apt upgrade picks it up with the rest of your packages.
Other Tools from deb.griffo.io
The repository packages several tools that work beautifully with fzf:
- zoxide - a smarter
cdwith an interactive fzf-powered mode. - eza - a modern, colourful replacement for
ls. - Neovim - the editor behind fuzzy pickers like Telescope.
- Lazygit - a Git terminal UI that complements fuzzy branch and commit selection.
Troubleshooting
GPG or Key Errors
If APT reports the repository as unsigned or the key as invalid, re-add it:
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update
Package Not Found
If APT cannot find fzf:
- Re-run
sudo apt updateafter adding the repository. - Confirm your Ubuntu release is supported (Jammy, Noble, or newer).
- Inspect the source list:
cat /etc/apt/sources.list.d/deb.griffo.io.list.
CTRL-R Still Uses the Default History Search
If CTRL-R opens the plain Bash reverse search rather than fzf, the integration is not loaded or another tool has rebound the key. Confirm the setup and check for conflicts:
grep -n "fzf --bash" ~/.bashrc
bind -p | grep -i "C-r"
Ensure the eval "$(fzf --bash)" line is present and start a fresh shell.
Uninstalling
Remove fzf with:
sudo apt remove fzf
To also remove the repository and key:
sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update
Do not forget to remove any fzf source or eval lines from ~/.bashrc.
Conclusion
On Ubuntu, deb.griffo.io delivers a current fzf through APT, sidestepping both a lagging archive package and a manual Go build. With the shell key-bindings and completion switched on, fuzzy file insertion, history search and directory jumping become second nature.
fzf rewards a small amount of setup with a large amount of daily leverage, and thanks to APT, keeping it up to date is just part of your usual apt upgrade.
Resources
Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream fzf project.