Ad space (banner)
🖥️Linux Lessons
Lesson 3 / 61

Checking Where You Are with pwd

pwd is for when "I don't know which folder I'm currently in." pwd stands for Print Working Directory, and it prints the absolute path of your current location (the current directory).

Just type pwd alone — it needs no options or arguments. Running it prints a single line, an absolute path like /home/user/project.

Checking your location with pwd before manipulating files or running commands prevents the accident of creating or deleting files in the wrong place.

A common early mistake is that it doesn't line up with your GUI's sense of "the folder I currently have open" — the terminal and a file browser each track their own separate location.

In real work, this is one of the most fundamental commands, frequently used to confirm the base for relative paths inside a shell script.

Linux
Try it (type this into the pseudo terminal)
pwd

🧑‍💻 You can type this command into the Linux pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)