Home : Linux : Commands : pwd

pwd command

(Print working directory)

Use the pwd command to print the working directory (the current directory you are in).

> pwd
> cd /home/rich/www
> pwd

Line 1 of this example shows the command pwd has been entered
Line 2 displays, or 'prints' the output of the pwd command (ie: the directory you are in - /home in this case)
Line 3 uses the cd command (change directory) to move to the /home/rich/www directory
Line 4 enters the pwd command again
Line 5 shows we are now in the /home/rich/www directory
Line 6 is the prompt again

TIP: If you want to see the contents of the directory you are in, use the ls command

Back to index