What Linux command displays the current working directory? The command is pwd.
The name pwd means “print working directory.” When run without arguments, it writes the full path of the directory in which the shell is currently operating. For example, entering pwd after opening a terminal might produce `/home/alex/projects`.
The command is useful because shell sessions always have a current location, and commands often read or create files relative to it. Running pwd can prevent mistakes when a path is unfamiliar, especially inside scripts, remote sessions, containers, or deeply nested project folders. The shell also commonly stores this location in the PWD environment variable.
A frequent mix-up is choosing ls, which lists directory contents, or cd, which changes the current directory. The command `cd` with no argument may return a user to their home directory, but it does not display the current path. In many Unix shells, pwd is a built-in command, and standalone implementations are also provided by Unix utilities. Options such as `pwd -P` can report a physical path without symbolic-link components, while the default generally preserves the logical path.