Linux for Developers
/Beginner
pwd
Definition
Print Working Directory. A command that outputs the absolute, full path of the directory (folder) you are currently located in.
Explain Like I'm New
The 'Where am I right now?' button. The terminal has no visual folders. If you get lost, typing `pwd` tells you exactly where you are standing.
Real World Example
You open a terminal and type `pwd`. It outputs `/home/alice/Documents/projects`. This tells you any file you create right now will be saved in the 'projects' folder.
Common Use Cases
- •Navigation
- •Scripting path verification
Interview Questions
basic
- If you are lost in the terminal, what command tells you your current location?
intermediate
- Does `pwd` show the relative path or the absolute path?