LIVEReading: Supercharge Your Terminal with fzf Fuzzy SearchTotal time: 10 minSteps: 6Worked first time: 82% LIVEReading: Supercharge Your Terminal with fzf Fuzzy SearchTotal time: 10 minSteps: 6Worked first time: 82%
CBW
Supercharge Your Terminal with fzf Fuzzy Search
Mediumgithub.com/junegunn/fzf2026-06-04

Supercharge Your Terminal with fzf Fuzzy Search

fzf turns your terminal into a fast, interactive search tool. Find files, browse command history, and navigate anything — all with fuzzy typing.

// Build stats

  • Total time10 min
  • Number of steps6
  • DifficultyMedium
  • Worked first time82%
// Before you start

What you need

  • A Mac, Linux machine, or Windows PC
  • A terminal app open (Terminal on Mac, any shell on Linux, PowerShell/CMD on Windows)
  • Homebrew installed on Mac/Linux — or Scoop/Winget on Windows
01
Step 1 of 6

Install fzf

2 min

Pick the command that matches your system. This downloads and installs the fzf binary — a single small program. You only need one of these commands.

Terminal · mac
$ # Mac or Linux with Homebrew:
$ brew install fzf
$
$ # Ubuntu / Debian Linux:
$ sudo apt install fzf
$
$ # Arch Linux:
$ sudo pacman -S fzf
$
$ # Fedora:
$ sudo dnf install fzf
$
$ # Windows (Winget):
$ winget install fzf
$
$ # Windows (Scoop):
$ scoop install fzf
$
$ # Windows (Chocolatey):
$ choco install fzf
What you should see
A success message from your package manager saying fzf was installed.
This might happen

Command not found after install

Close your terminal and open a new one. The new program needs a fresh session to appear in your PATH.

02
Step 2 of 6

Confirm fzf is working

1 min

Run this quick check to make sure fzf installed correctly and your terminal can find it.

Terminal · mac
$ fzf --version
What you should see
A version number like: 0.60.0 (brew)
03
Step 3 of 6

Enable shell integration (key bindings + fuzzy completion)

3 min

This is the step that makes fzf truly useful. It adds three keyboard shortcuts to your shell: CTRL-R to search command history, CTRL-T to search files, and ALT-C to jump into folders. You add one line to your shell config file. Pick the block that matches your shell. Not sure which shell you use? On Mac the default is zsh. On most Linux systems it is bash.

Terminal · mac
$ # --- For BASH users ---
$ # Open your bash config file:
$ nano ~/.bashrc
$ # Add this line at the bottom, then save (CTRL+O, Enter, CTRL+X):
$ eval "$(fzf --bash)"
$ # Reload it:
$ source ~/.bashrc
$
$ # --- For ZSH users (Mac default) ---
$ # Open your zsh config file:
$ nano ~/.zshrc
$ # Add this line at the bottom, then save (CTRL+O, Enter, CTRL+X):
$ source <(fzf --zsh)
$ # Reload it:
$ source ~/.zshrc
$
$ # --- For FISH users ---
$ # Run this once — it adds the integration automatically:
$ fzf --fish | source
What you should see
No error messages. Your prompt returns normally.
This might happen

nano: command not found

Try using 'vi' instead of 'nano', or open the file in any text editor (e.g. open ~/.zshrc on Mac opens it in TextEdit).

04
Step 4 of 6

Try fzf on your files right now

2 min

Open a new terminal window (so the shell integration is active), then run fzf by itself. It will list every file in your current folder and subfolders. Start typing any part of a filename — fzf narrows the list instantly. Press Enter to select. Press ESC to cancel.

Terminal · mac
$ fzf
What you should see
A full-screen interactive list of files. Type to filter. The list shrinks as you type.
This might happen

The list is empty or shows very few files

fzf searches from your current directory. Navigate somewhere with files first: try 'cd ~' then run 'fzf' again.

05
Step 5 of 6

Use the three killer keyboard shortcuts

3 min

These shortcuts work in your terminal after shell integration is set up. CTRL-R replaces your normal history scroll — type any fragment of a past command and fzf finds it instantly. CTRL-T lets you fuzzy-search for a file and paste its path into whatever command you are typing. ALT-C lets you jump into any subfolder by fuzzy-typing its name. Try each one now.

Terminal · mac
$ # Press CTRL-R in your terminal to search command history
$ # Press CTRL-T to search for a file path mid-command
$ # Press ALT-C to fuzzy-jump into a directory
$
$ # Example: type this, then press CTRL-T to pick a file interactively:
$ cat
What you should see
CTRL-R opens a searchable history list. CTRL-T opens a file picker and pastes the chosen path after 'cat'. ALT-C changes your directory.
This might happen

CTRL-R still shows the old dumb history, not fzf

You need to open a brand-new terminal window after adding the integration line. The current session does not pick up changes to .bashrc or .zshrc automatically.

06
Step 6 of 6

Preview file contents while searching

2 min

fzf can show a live preview of any file as you highlight it. This command opens fzf with a side panel showing the contents of whichever file your cursor is on. It is a great way to find the right file without opening each one.

Terminal · mac
$ fzf --preview 'cat {}'
What you should see
The fzf list appears on the left. As you move the cursor up and down, the right panel shows the file's contents in real time.
This might happen

Preview panel shows binary garbage for some files

That is normal — binary files (images, executables) do not display as text. Just keep scrolling past them.

// Status

cooked. baked. worked.

A working fuzzy finder in your terminal. You can search files, jump through command history with CTRL-R, and pick file paths mid-command with CTRL-T — all without memorizing exact names.

// the honest bit

The honest part

fzf is a terminal tool — it lives entirely in the command line. There is no graphical window or app icon. If you are not comfortable in a terminal at all, the install will work but the tool will feel unfamiliar. Shell integration (step 3) requires editing a config file; if that step goes wrong, fzf still works when you type 'fzf' directly — you just lose the keyboard shortcuts. Windows support is real but the keyboard shortcuts work best in WSL (Windows Subsystem for Linux) rather than plain PowerShell.