pwd command in Linux with Examples
pwd stands for Print Working Directory. It prints the path of the working directory, starting from the root.
pwd is shell built-in command(pwd) or an actual binary(/bin/pwd).
$PWD is an environment variable which stores the path of the current directory.
This command has two flags.
pwd -L: Prints the symbolic path.
pwd -P: Prints the actual path.
A)Built-in pwd (pwd):

In the given example the directory /home/shital/logs/ is a symbolic link for a target directory /var/logs/
B)Binary pwd (/bin/pwd):

The default behavior of Built-in pwd is same as pwd -L.
And the default behavior of /bin/pwd is same as pwd -P.

The $PWD variable value is same as pwd -L.
Recommended Posts:
- cut command in Linux with examples
- tac command in Linux with Examples
- atd command in Linux with examples
- man command in Linux with Examples
- cpp command in Linux with Examples
- rev command in Linux with Examples
- cvs command in Linux with Examples
- w command in Linux with Examples
- cp command in Linux with examples
- sum command in Linux with Examples
- last command in Linux with Examples
- help Command in Linux with examples
- dir command in Linux with examples
- ln command in Linux with Examples
- ex command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



