Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Reference | 2025.1

# PWD

The directory used to resolve relative filename arguments to P4 Server commands.

## Usage notes

Used by Client? | Used by Server? | Command-Line Alternative | Can be set in P4CONFIG file?
--- | --- | --- | ---
Yes | No | `p4 -d directory command` | No

## Value if not explicitly set

Operating System | Value
--- | ---
UNIX | The value of `PWD` as set by the shell; if not set by the shell, `getcwd()` is used.
All Others | The actual current working directory.

## Notes

Sometimes the `PWD` variable is not inherited properly across shells. For instance, if you’re running `ksh` or `sh` on top of `csh`, `PWD` will be inherited from your `csh` environment but not updated properly, causing possible confusion in subsequent P4 Server commands.

If you encounter such difficulties, check to be sure you’ve unset `PWD` in your `.profile` or `.kshrc` file. (If you’re running `sh` or `ksh` as your login shell, `PWD` will be managed properly by the shell regardless of any environment variables unset in your startup files; the confusion only occurs when variables are exported to sub-shells.)

Your search for returned results