The PWD command of Linux is also a very common command, this article describes the use of the PWD command in Linux.
For more information on Linux commands, see: Linux Command Quick check manual
The Linux pwd command is used to display the working directory.
The PWD command will immediately know the absolute path name of the working directory you are currently in.
One, 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
-L directory connection link, output connection path
-P Output Physical path
Ii. examples of Linux pwd commands
To view the 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
Write to environment variable
Export ps1= ' [\[email protected] $PWD]\$ '
This will show the current directory in front of the command prompt.
As shown below:
[[Email protected]/root/linuxdaxue.com/testdir]#
OK, the Linux PWD command related content first introduced to you here.
For more information on Linux commands, see: Linux Command Quick check manual
- Copyright Notice: original article, 3 months ago, published by the University of Linux (linuxdaxue.com), a total of 602 words.
- reprint Please specify: Linux Command-pwd Command | Linux University
Linux Command-pwd command