Install fd Command for Finding Files on Ubuntu 20.04

Install fd Command for Finding Files on Ubuntu 20.04

The fd is a command line tool that allows to find files in a directory hierarchy. This tool can be used as an alternative to the find command.

This tutorial demonstrates how to install fd command on Ubuntu 20.04.

Install fd

Get the latest version tag of fd release from GitHub and assign it to variable:

FD_VERSION=$(curl -s "" | grep -Po '"tag_name": "v\K[0-9.]+')

Download Debian package (.deb) from releases page of the fd repository:

curl -Lo fd.deb "${FD_VERSION}_amd64.deb"

Install fd:

sudo apt install -y ./fd.deb

When installation is finished, we can check fd version:

fd --version

Remove .deb package because no longer needed it:

rm -rf fd.deb

Testing fd

The fd command has many uses cases. For example, the following command searches for files and directories in the specified directory:

fd hosts /etc

An example of output:


Uninstall fd

If you decided to completely remove fd, run the following command:

sudo apt purge --autoremove -y fd

Leave a Comment

Cancel reply

Your email address will not be published.