<s>
In	O
Unix-like	B-Operating_System
and	O
some	O
other	O
operating	B-General_Concept
systems	I-General_Concept
,	O
the	O
pwd	O
command	B-Application
(	O
print	O
working	B-Application
directory	I-Application
)	O
writes	O
the	O
full	O
pathname	B-Application
of	O
the	O
current	B-Application
working	I-Application
directory	I-Application
to	O
the	O
standard	O
output	O
.	O
</s>
<s>
Multics	B-Application
had	O
a	O
pwd	O
command	B-Application
(	O
which	O
was	O
a	O
short	O
name	O
of	O
the	O
print_wdir	O
command	B-Application
)	O
from	O
which	O
the	O
Unix	B-Application
pwd	O
command	B-Application
originated	O
.	O
</s>
<s>
The	O
command	B-Application
is	O
a	O
shell	O
builtin	O
in	O
most	O
Unix	B-Application
shells	I-Application
such	O
as	O
Bourne	B-Device
shell	I-Device
,	O
ash	B-Operating_System
,	O
bash	B-Operating_System
,	O
ksh	B-Language
,	O
and	O
zsh	B-Application
.	O
</s>
<s>
It	O
can	O
be	O
implemented	O
easily	O
with	O
the	O
POSIX	O
C	B-Language
functions	O
getcwd( )	O
or	O
getwd( )	O
.	O
</s>
<s>
It	O
is	O
also	O
available	O
in	O
the	O
operating	B-General_Concept
systems	I-General_Concept
SpartaDOS	B-Operating_System
X	I-Operating_System
,	O
PANOS	B-Operating_System
,	O
and	O
KolibriOS	B-Operating_System
.	O
</s>
<s>
The	O
equivalent	O
on	O
DOS	B-Device
(	O
COMMAND.COM	B-Operating_System
)	O
and	O
Microsoft	B-Application
Windows	I-Application
(	O
cmd.exe	B-Device
)	O
is	O
the	O
cd	B-Application
command	B-Application
with	O
no	O
arguments	O
.	O
</s>
<s>
Windows	B-Application
PowerShell	I-Application
provides	O
the	O
equivalent	O
Get-Location	O
cmdlet	O
with	O
the	O
standard	O
aliases	O
gl	O
and	O
pwd	O
.	O
</s>
<s>
On	O
Windows	B-Operating_System
CE	I-Operating_System
5.0	I-Operating_System
,	O
the	O
cmd.exe	B-Device
Command	B-Device
Processor	I-Device
Shell	I-Device
includes	O
the	O
pwd	O
command	B-Application
.	O
</s>
<s>
as	O
found	O
on	O
Unix	B-Application
systems	I-Application
is	O
part	O
of	O
the	O
X/Open	O
Portability	O
Guide	O
since	O
issue	O
2	O
of	O
1987	O
.	O
</s>
<s>
It	O
was	O
inherited	O
into	O
the	O
first	O
version	O
of	O
POSIX.1	O
and	O
the	O
Single	O
Unix	B-Application
Specification	O
.	O
</s>
<s>
It	O
appeared	O
in	O
Version	B-Operating_System
5	I-Operating_System
Unix	I-Operating_System
.	O
</s>
<s>
The	O
version	O
of	O
pwd	O
bundled	O
in	O
GNU	B-Application
coreutils	I-Application
was	O
written	O
by	O
Jim	O
Meyering	O
.	O
</s>
<s>
The	O
OpenVMS	B-Operating_System
equivalent	O
is	O
show	O
default	O
.	O
</s>
<s>
Command	B-Application
Explanation	O
pwd	O
Display	O
the	O
current	B-Application
working	I-Application
directory	I-Application
.	O
</s>
<s>
Example	O
:	O
/home/foobar	O
pwd	O
-P	O
Display	O
the	O
current	B-Application
working	I-Application
directory	I-Application
physical	O
path	O
-	O
without	O
symbolic	O
link	O
name	O
,	O
if	O
any	O
.	O
</s>
<s>
Example	O
:	O
If	O
standing	O
in	O
a	O
dir	O
/home/symlinked	O
,	O
that	O
is	O
a	O
symlink	O
to	O
/home/realdir	O
,	O
this	O
would	O
show	O
/home/realdir	O
pwd	O
-L	O
Display	O
the	O
current	B-Application
working	I-Application
directory	I-Application
logical	O
path	O
-	O
with	O
symbolic	O
link	O
name	O
,	O
if	O
any	O
.	O
</s>
<s>
POSIX	O
shells	O
set	O
the	O
following	O
environment	O
variables	O
while	O
using	O
the	O
cd	B-Application
command	B-Application
:	O
</s>
<s>
OLDPWD	O
The	O
previous	O
working	B-Application
directory	I-Application
(	O
as	O
set	O
by	O
the	O
cd	B-Application
command	B-Application
)	O
.	O
</s>
<s>
PWD	O
The	O
current	B-Application
working	I-Application
directory	I-Application
(	O
as	O
set	O
by	O
the	O
cd	B-Application
command	B-Application
)	O
.	O
</s>
