# pwd - pydoc - phpman

> **TLDR:** Print the name of current/working directory.
>
- Print the current directory:
  `pwd`
- Print the current directory, and resolve all symlinks (i.e. show the "physical" path):
  `pwd {{-P|--physical}}`
- Display help:
  `pwd --help`

*Source: tldr-pages*

---

Help on built-in module pwd:

## NAME
    pwd

## DESCRIPTION
    This module provides access to the Unix password database.
    It is available on all Unix versions.

    Password database entries are reported as 7-tuples containing the following
    items from the password database (see `<pwd.h>'), in order:
    pw_name, pw_passwd, pw_uid, pw_gid, pw_gecos, pw_dir, pw_shell.
    The uid and gid items are integers, all others are strings. An
    exception is raised if the entry asked for cannot be found.

## CLASSES
    builtins.tuple(builtins.object)
        struct_passwd

### class struct_passwd
     |  struct_passwd(iterable=(), /)
     |
     |  pwd.struct_passwd: Results from getpw*() routines.
     |
     |  This object may be accessed either as a tuple of
     |    (pw_name,pw_passwd,pw_uid,pw_gid,pw_gecos,pw_dir,pw_shell)
     |  or via the object attributes as named in the above tuple.
     |
     |  Method resolution order:
     |      struct_passwd
     |      builtins.tuple
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  pw_dir
     |      home directory
     |
     |  pw_gecos
     |      real name
     |
     |  pw_gid
     |      group id
     |
     |  pw_name
     |      user name
     |
     |  pw_passwd
     |      password
     |
     |  pw_shell
     |      shell program
     |
     |  pw_uid
     |      user id
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __match_args__ = ('pw_name', 'pw_passwd', 'pw_uid', 'pw_gid', 'pw_geco...
     |
     |  n_fields = 7
     |
     |  n_sequence_fields = 7
     |
     |  n_unnamed_fields = 0
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.tuple:
     |
     |  __add__(self, value, /)
     |      Return self+value.
     |
     |  __contains__(self, key, /)
     |      Return key in self.
     |
     |  __eq__(self, value, /)
     |      Return self==value.
     |
     |  __ge__(self, value, /)
     |      Return self>=value.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __getnewargs__(self, /)
     |
     |  __gt__(self, value, /)
     |      Return self>value.
     |
     |  __hash__(self, /)
     |      Return hash(self).
     |
     |  __iter__(self, /)
     |      Implement iter(self).
     |
     |  __le__(self, value, /)
     |      Return self<=value.
     |
     |  __len__(self, /)
     |      Return len(self).
     |
     |  __lt__(self, value, /)
     |      Return self<value.
     |
     |  __mul__(self, value, /)
     |      Return self*value.
     |
     |  __ne__(self, value, /)
     |      Return self!=value.
     |
     |  __rmul__(self, value, /)
     |      Return value*self.
     |
     |  count(self, value, /)
     |      Return number of occurrences of value.
     |
     |  index(self, value, start=0, stop=9223372036854775807, /)
     |      Return first index of value.
     |
     |      Raises ValueError if the value is not present.
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.tuple:
     |
     |  __class_getitem__(...) from builtins.type
     |      See PEP 585

## FUNCTIONS
### getpwall
        Return a list of all available password database entries, in arbitrary order.

        See help(pwd) for more on password database entries.

### getpwnam
        Return the password database entry for the given user name.

        See `help(pwd)` for more on password database entries.

### getpwuid
        Return the password database entry for the given numeric user ID.

        See `help(pwd)` for more on password database entries.

## FILE
    (built-in)


