LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pwd

Display current working directory path

TLDR

Print working directory
$ pwd
copy
Print physical path (no symlinks)
$ pwd -P
copy
Print logical path (with symlinks)
$ pwd -L
copy

SYNOPSIS

pwd [options]

DESCRIPTION

pwd prints the absolute path of the current working directory. It is one of the most basic shell commands, used to confirm your location in the filesystem when navigating between directories.The -P flag resolves symbolic links to display the physical path, while -L (the default in most shells) preserves symbolic link components in the path. Both a shell built-in version and a standalone binary from GNU coreutils exist; the built-in is used by default in interactive shells.

PARAMETERS

-L

Logical path (follow symlinks).
-P
Physical path (resolve symlinks).

INSTALL

sudo apt install coreutils
copy
sudo dnf install coreutils
copy
sudo pacman -S coreutils
copy
sudo apk add coreutils
copy
sudo zypper install coreutils
copy
brew install coreutils
copy
nix profile install nixpkgs#coreutils
copy

CAVEATS

Shell built-in and external command. Behavior may differ.

HISTORY

pwd is a classic Unix command for directory display.

SEE ALSO

cd(1), dirs(1), basename(1)

Copied to clipboard
Kai