# which

*noun*

say it: **“WICH”** **/wɪtʃ/**

A command that prints the path of the program file a command name runs, so you can see where that program is stored.

## What does `which` do?

`which` prints where the program behind a command name lives on the disk. In bash it prints nothing for a shell builtin such as `cd`, because there's no file to find.

```bash
which wc
# /usr/bin/wc
```

## In a sentence

- “Lina ran **which** wc and saw /usr/bin/wc.”
- “With two copies installed, **which** showed the one the terminal was really running.”

Level: Apprentice · [More Unix terms at this level](https://www.ask-codey.com/glossary?category=unix&level=2)

Updated: November 10, 2026

Source: https://www.ask-codey.com/glossary/which
