what is pwd in linux

what is pwd in linux

1 year ago 70
Nature

In Linux, pwd stands for "Print Working Directory". It is a command that prints the full path name of the current working directory to the terminal. The command has two forms: a shell built-in command and an actual binary. The pwd command doesnt have any arguments or options, but it can accept flags for specific behavior. The two most commonly used flags are:

  • -L: Resolves symbolic links and prints the path of the target directory.
  • -P: Displays the actual path without resolving symbolic links.

By default, the shell built-in pwd command is equivalent to using pwd -L, while the binary /bin/pwd has the same behavior as pwd -P . The $PWD environment variable stores the path of the current directory.

Read Entire Article