How do I use the `pwd` command?

You can use the pwd command by simply typing it into the terminal and pressing Enter. Here’s how to do it:

  1. Open your terminal.

  2. Type the following command:

    pwd
  3. Press Enter.

The terminal will then display the full path of your current working directory. For example, you might see output like this:

/home/labex/project

Options

You can also use options with the pwd command:

  • Logical Path (-L): This option shows the logical path, which is the path as it appears in the file system, including any symbolic links.

    pwd -L
  • Physical Path (-P): This option shows the physical path, which resolves any symbolic links to display the actual path.

    pwd -P

In most cases, if you are not in a directory with symbolic links, both -L and -P will give you the same output.

0 Comments

no data
Be the first to share your comment!