The File System, The Working Directory, And Pwd

Typically you use a program called Terminal to access the files and navigate through the directories on your file system. (There are also several other options for ‘shell prompts,’ among them: iTerm2AlacrittyHyperKittyMacTerm. Whichever program you use, the screen that looks like this is called your shell prompt.

The directories and their sub-directories of your file system make up a hierarchy. As you code, you will navigate your shell prompt to different folders on your hard drive.

Where you currently are at your shell prompt— that is, the current directory— is called the current working directory (or CWD).

Let’s start with your first Unix command: pwd

pwd stands for print working directory and will do just that. It will print the location where you currently are at your shell prompt, also known as the current working directory.

To run pwd, simply type pwd at the command prompt.

Complete and Continue