pwd command stands for “print working directory”. It is a fundamental command that displays the absolute path of the current working directory.
When you open a terminal window, you are placed in a directory. This is your current working directory. The
pwd command is used to display the absolute path of this directory. The absolute path is the full path from the root directory to the current working directory.
To use the
pwd command, simply type
pwd in the terminal and press enter. The command will output the absolute path of your current working directory.
$ pwd /home/user/Documents
pwd command can be used in scripts to obtain the current working directory and perform actions on files or directories relative to the current directory.
pwd command has no options.
pwd command is not working as expected, here are some troubleshooting tips:
- Make sure you are typing the command correctly.
- Check that you are in the correct directory. If you are not in the directory you expect to be in, the
pwdcommand will display a different path than you are expecting.
- If you are still having issues, try closing and reopening your terminal window.
pwdcommand is a basic command that is available on all Linux systems.
- The output of the
pwdcommand can be used in scripts to perform actions relative to the current working directory.