Bash - (Current|Working) Directory
Table of Contents
1 - About
This article is about the management of the current directory in Bash.
2 - Articles Related
3 - Management
3.1 - Query
3.2 - Shell variable
shell variable concerning the current directory
3.2.1 - Current: $PWD
working directory
pwd stands for “print working directory”.
echo $PWD
3.2.2 - Old: $OLDPWD
Old working directory (“OLD-Print-Working-Directory”, previous directory you were in).
cd must have be used once.
echo $OLDPWD