How to Fix bash: fd: command not found in Minimal Linux Distributions

The fd utility (fd-find) is a simple, fast, and user-friendly alternative to the traditional GNU find command written in Rust that features colorized output, sensible defaults (ignoring hidden and gitignored files), and regex searching. In freshly provisioned minimal Linux installations, container base images, or Debian servers, running fd returns bash: fd: command not found because the package is not pre-installed in default distributions, or because Debian-based operating systems package it under the alternative executable name fdfind.

Create Symlink for Debian and Ubuntu Installations (fdfind)

On Debian, Ubuntu, and Raspberry Pi OS, the package manager installs the binary as fdfind to prevent naming collisions with an existing system binary:

# Install fd package via APT
sudo apt update && sudo apt install -y fd-find

# Create user symlink to enable the standard fd command
mkdir -p ~/.local/bin
ln -s $(which fdfind) ~/.local/bin/fd

# Ensure ~/.local/bin is in your PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

# Verify installation
fd --version

Install via Pre-Compiled Static Binary

For minimal container environments without package managers, download the official pre-compiled release binary:

# Download latest fd release archive for Linux x86_64
curl -sSL https://github.com/sharkdp/fd/releases/latest/download/fd-v10.2.0-x86_64-unknown-linux-musl.tar.gz -o /tmp/fd.tar.gz

# Extract binary directly into system bin
sudo tar -xzf /tmp/fd.tar.gz -C /usr/local/bin/ --strip-components=1

# Ensure executable execution permissions
sudo chmod +x /usr/local/bin/fd

# Clean up archive
rm -f /tmp/fd.tar.gz

# Verify installation
fd --version

Install on Other Linux Distributions

Other modern distributions package fd directly under its primary name:

# On Arch Linux:
sudo pacman -S fd

# On Alpine Linux:
apk add fd

# On systems with Homebrew:
brew install fd

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.