Skip to content

Lesson 4: Finding out where you are

There may be many hundreds of directories on any Linux machine, so how do you know which one you are in? The command pwd will print the Working Directory and that's all this command does:

[learner ~]$ pwd
/home/learner

When you log in to a Linux computer, you are typically placed into your home directory. If you type pwd, you will see that you have started in your home directory. Should you ever get lost in the Linux filesystem, remember the pwd command.

As you learn Linux you will frequently type commands that don't seem to work. One common reason may be because you are in the wrong directory, so it's a really good habit to get used to running the pwd command a lot.