How to install fzf

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 4, 2026

Quick Answer: To install fzf, the most common method is using a package manager like Homebrew on macOS or apt on Debian/Ubuntu. Alternatively, you can compile it from source using Go or download pre-compiled binaries from the official GitHub repository.

Key Facts

Overview

fzf is a powerful and versatile command-line fuzzy finder. It allows you to quickly search and select files, directories, command history, and much more, directly from your terminal. Its interactive nature and speed make it an indispensable tool for developers, system administrators, and anyone who spends a significant amount of time working in the command line. This guide will walk you through the most common and recommended methods for installing fzf.

Installation Methods

1. Using Package Managers (Recommended)

Package managers simplify the installation process significantly, handling dependencies and ensuring you get a stable version. The specific command depends on your operating system and preferred package manager.

macOS (Homebrew)

If you are using macOS and have Homebrew installed, this is often the easiest method:

brew install fzf

After installing the package, Homebrew will usually prompt you to run an installation script to set up fzf's key bindings (Ctrl+T, Ctrl+R, Alt+C) and command-line completion. If it doesn't, you can manually run:

$(brew --prefix)/opt/fzf/install

Follow the on-screen prompts to enable these features. It's highly recommended to enable them for the best user experience.

Debian/Ubuntu (apt)

On Debian-based Linux distributions like Ubuntu, you can use the Advanced Packaging Tool (apt):

sudo apt updatesudo apt install fzf

Similar to Homebrew, after installation, you should run the install script to configure key bindings and completion. The script is usually located in /usr/share/doc/fzf/examples/install or can be found by searching for it. A common way to execute it is:

/usr/share/doc/fzf/examples/install

Again, follow the prompts to integrate fzf seamlessly into your shell.

Arch Linux (pacman)

For Arch Linux users, pacman is the package manager:

sudo pacman -S fzf

The install script for shell integration is typically located at /usr/share/fzf/install.

/usr/share/fzf/install

2. Compiling from Source (Go)

If you prefer to use the latest development version or have specific compilation needs, you can compile fzf from its source code. This method requires you to have the Go programming language installed (version 1.18 or later is recommended).

  1. Install Go: If you don't have Go installed, follow the official instructions for your operating system: https://go.dev/doc/install
  2. Get the fzf source code: Use the go get command. This will download and compile fzf into your Go bin path (usually $GOPATH/bin or $HOME/go/bin).
    go install github.com/junegunn/fzf/v2@latest
  3. Add to PATH: Ensure that the directory where Go installs binaries (e.g., $HOME/go/bin) is included in your system's PATH environment variable. You might need to add a line like export PATH=$HOME/go/bin:$PATH to your shell configuration file (e.g., .bashrc, .zshrc).
  4. Run the install script: After compiling and ensuring it's in your PATH, navigate to the source directory (if you cloned it manually) or simply run the installed binary. Then, execute the install script:
    fzf --install
    This command will guide you through setting up the necessary shell integrations.

3. Downloading Pre-compiled Binaries

The fzf project provides pre-compiled binaries for various platforms on its GitHub releases page. This is a good option if you don't want to use a package manager or compile from source.

  1. Visit the Releases Page: Go to the official fzf GitHub repository's releases section: https://github.com/junegunn/fzf/releases
  2. Download the Binary: Find the latest release and download the appropriate binary for your operating system and architecture (e.g., fzf-*-linux_amd64.tar.gz, fzf-*-macos_amd64.tar.gz).
  3. Extract the Binary: Extract the downloaded archive. You will find an executable file named fzf.
    tar -xzf fzf-*-linux_amd64.tar.gz
  4. Place in PATH: Move the extracted fzf executable to a directory that is included in your system's PATH, such as /usr/local/bin.
    sudo mv fzf /usr/local/bin/
  5. Run the install script: Once the binary is in your PATH, you can run the install script:
    fzf --install
    Follow the prompts to set up key bindings and completion.

Post-Installation: Shell Integration

Regardless of the installation method, the crucial step for making fzf truly useful is integrating it with your shell. This is typically done by running the install script that comes with fzf.

The install script modifies your shell's configuration file (e.g., ~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish) to:

When prompted by the install script, it's highly recommended to answer 'y' (yes) to enable these features. After the script completes, you'll need to restart your shell or source your configuration file (e.g., source ~/.bashrc) for the changes to take effect.

Verification

To verify that fzf is installed and configured correctly, open a new terminal window and try the key bindings:

If these commands work as expected, fzf is successfully installed and integrated into your shell.

Sources

  1. fzf - A command-line fuzzy finderMIT
  2. fzf on Homebrewfair-use
  3. fzf package details on Debianfair-use

Missing an answer?

Suggest a question and we'll generate an answer for it.