Linux pwd command: Display the current working directory path.
Linux pwd command Function Description
使用pwd命令可以显示当前用户所处的工作目录的绝对路径。
Linux pwd command Syntax
pwd [Option]
The meaning of each option in the command is shown in the table.
Option | Description |
---|---|
-L |
When linking to a directory, output the link path |
-P |
Output physical path |
Linux pwd command Examples
Display the path to the user’s current working directory:
pwd
Output:
Show the actual physical path to the user’s current working directory
[root@rhel init.d]# pwd
/etc/init.d
[root@rhel init.d]# pwd -P
/etc/rc.d/init.d
Show the link path to the user’s current working directory
/etc/init.d