Displaying the Current Working Directory in Linux | pwd Command (original) (raw)

Last Updated : 1 Nov, 2025

The pwd command in Linux displays the full path of your current working directory from the root directory.

It helps users identify their exact location within the Linux file system hierarchy.

**Displaying the Current Working Directory

To print the current working directory, simply enter:

pwd

Display the Current Working Directory

Display the Current Working Directory

Syntax

The basic syntax of the 'pwd' command is

pwd [OPTIONS]

This command doesn't have any arguments or options, but it can accept flags for specific behavior.

**1. Displaying the Current Working Directory Using Binary pwd (/bin/pwd):

The binary /bin/pwd displays the absolute path of the current working directory directly from the system’s executable, ensuring accurate results even in complex environments.

**Syntax:

/bin/pwd

BinaDisplay the Current Working Directory ry pwd (/bin/pwd):

Display the Current Working Directory

**2. The $PWD Environment variable.

The $PWD environment variable is a dynamic variable that stores the path of the current working directory. It holds the same value as 'pwd -L' – representing the symbolic path.

$PWD

$PWD

Executing this command prints the symbolic path stored in the $PWD environment variable

Flags For Specific behavior in `pwd` command in Linux.

**pwd -L: Prints the symbolic path. 
**pwd -P: Prints the actual path.