Determining Your Current Directory with pwd

Red Hat Linux 8.0: The Official Red Hat Linux Getting Started Guide
Prev | Chapter 11. Shell Prompt Basics | Next

# Determining Your Current Directory with `pwd`

Once you start looking through directories, it is easy to get lost or forget the name of your current directory. By default, bash shows just your current directory, not the entire path.

Figure 11-2. The Command `pwd` Shows You Where You Are

To determine the exact location of your current directory within the file system, go to a shell prompt and type the command `pwd`.

You should see something like:

    /home/sam

This tells you that you are in the user `sam`'s directory, which is in the `/home` directory.

The command `pwd` stands for print working directory. When you typed `pwd`, you asked your Linux system to display your current location. Your system responded by printing the name of the current directory in the terminal window, also known as the standard output.

You will find that using `pwd` is very helpful as you learn to navigate your new Linux system.

Prev | Home | Next
The History of the Shell | Up | Changing Directories with `cd`