Working Directory

noun

say it: “WUR-king dih-REK-tuh-ree” /ˈwɜːrkɪŋ dɪˈrɛktəri/

The folder the terminal is in right now. Commands look for files there unless they're given another path.

What is the working directory in a terminal?

The working directory is the folder your terminal is in right now. A command such as ls lists this folder, and a file name on its own is looked for here. pwd prints it, and cd changes it.

cd ~/school/biology
pwd
# /home/maya/school/biology

In a sentence

  • “The script couldn't find notes.txt because the working directory was the home folder, not the project folder.”
  • “Every new terminal starts with your home folder as its working directory.”

Level: Novice · More Unix terms at this level

Updated

In other subjects