pwd

Print the current Working Directory to standard output.

Syntax
 pwd [-LP]
Key
 -L Display the logical current working directory (default).
 -P Display the physical current working directory with any symbolic
 links resolved to their physical location.

The default action is to show the current folder as a logical path.
All components of the path will be actual folder names, none will be symbolic links.

Enabling the 'set -o physical' option for the set builtin command is equivalent to pwd -P.

Some shells provide a builtin pwd command which is similar or identical to this utility.

The return status is 0 unless an error occurs while reading the name of the current directory or an invalid option is supplied.

Examples

Show the logical current directory. Then use file to inspect the /home directory:

$ /bin/pwd
/home/Mustapha

$ file /home
/home: symbolic link to usr/home

Show current working directory with symbolic links resolved:

$ /bin/pwd -P
/usr/home/Mustapha

"Change is the law of life. And those who look only to the past or the present are certain to miss the future" ~ John F. Kennedy

Related Linux commands

cd - Change Directory.
Equivalent Windows command: CD - Change Directory / describe current folder.

(追記) (追記ここまで)
Copyright © 1999-2026 SS64.com
Some rights reserved

AltStyle によって変換されたページ (->オリジナル) /