The Linux pwd command is a very commonly used commands, we introduce in the Linux pwd command usage.
For more details see Linux commands: Linux Command Cheat Sheet
Linux pwd command to display the working directory.
Pwd command can be executed immediately know the absolute path name of your current working directory is located.
A, Linux pwd command syntax
pwd [OPTION]...
Parameter Description:
-L, --logical #use PWD from environment, even if it contains symlinks -P, --physical #avoid all symlinks --help #display this help and exit --version #output version information and exit
When -L directory connection link, a connection path output
-P output physical path
Two, Linux pwd command examples
View current directory:
#pwd /root/linuxdaxue.com/testDir
View link path
#pwd /etc/rc.d/init.d #pwd -P /etc/rc.d/init.d #pwd -L /etc/init.d
Wrote environment variables
export PS1='[\u@$PWD]\$'
In this way in front of the command prompt will display the current directory
As follows:
[root@/root/linuxdaxue.com/testDir]#
ok, about the Linux pwd command of relevant content to just give you about here.