Basic CommandsLesson 7Free preview
Bash Print Dir (pwd)
This lesson is part of Bash · All levels
Summary
The pwd command displays the current work directory location in absolute path form. It's very helpful after moving folders with a CD or when writing scripts that work in multiple locations. The result of pwd always starts from the root of the system file, which is the mark.
Key points
- Pwd = print working directory
- Generating the absolute path of the current directory
- Useful to verify location before dangerous orders.
- Pwd -P follows a symbolic link to a physical location
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.