

This is to be expected, since you’re searching for files within directories that regular users typically don’t have access to. Because of this, if you’re logged into the terminal as a non- root user, some of the example commands may include Permission denied in their output. Note: To illustrate how the find and locate commands work, the example commands in this guide search for files stored under /, or the root directory. Doing so will set you up with a secure server environment - including a non- root user with sudo privileges and a firewall configured with UFW - which you can use to build your Linux skills. If you plan to use a remote server to follow this guide, we encourage you to first complete our Initial Server Setup guide.


Note that this tutorial was validated using a Linux server running Ubuntu 20.04, but the examples given should work on a computer running any version of any Linux distribution. This can either be a virtual private server which you’ve connected to with SSH or your local machine. To follow along with this guide, you will need access to a computer running a Linux-based operating system. It will also briefly cover the locate command, which can be used to search for files in a different way. This will help you search for files on your system using a variety of filters and parameters. This guide will cover how to use the aptly named find command. One problem users run into when first learning how to work with Linux is how to find the files they are looking for.
