pwd command line tool and its examples

It is a command-line utility in Unix OS which prints the “working directory”. When it is run, then it prints the full path of the current working directory to the terminal.

This helps while moving from one path to another. This utility generlly does not take any arguments or options, and which only prints the current working directory over the terminal.

  • About pwd: To print name of current/working directory
  • Comes From: coreutils-8.4
  • Configuration Files:
  • Path: /bin/pwd

Examples:

1. To get the current working directory

# pwd

2. To get the present working directory from environment

# pwd -L
# pwd –logical

3. To avoid all symlinks

# pwd -p
# pwd –physical

4. To get the

# pwd help
# pwd –help

5. To get the pwd version info

# pwd –version

Related Commands: getcwd

Leave a Reply

Your email address will not be published. Required fields are marked *