# PATH: How a Command Is Found

When you type a command's name, the shell looks for a program file of that name in each folder of PATH, in order, so "command not found" means none of them has it, and adding a folder to PATH lets you run its programs by name from anywhere.

![Cheat sheet for the lesson PATH: How a Command Is Found: When you type a command's name, the shell looks for a program file of that name in each folder of PATH, in order, so "command not found" means none of them has it, and adding a folder to PATH lets you run its programs by name from anywhere.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/21e6642ea68643558ed3cc6da1fce151.webp)

- Category: Bash
- Level: Apprentice
- Tags: linux, path, shell-builtin, unix, which
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-path-cheat-sheet
