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. Bash, the shell for your Linux system shows, by default, just your current directory, not the entire path.

Figure 10-2. The Command pwd Shows You Where You Are

To determine the exact location of your current directory within the filesystem, go to a shell prommt and type the following command:


You should see something like:


This is telling you that you are in the /newuser directory, which is in your /home directory.

The command pwd stands for print working directory. When you typed pwd, you were asking your Linux system, "Where am I?" Your system responded by printing the directory you are in on the monitor, also known as the standard output.

You will be using pwd often as you look around. Even Linux experts depend on this command.