pwd command in Linux/Unix

 

pwd command in Linux/Unix

Unix/Linux pwd command.

pwd - print working directory, is a Linux command to get the current working directory.

 

pwd syntax

$ pwd [option]

pwd command examples

Change directory to /usr/src directory and print working directory:

$ cd /usr/src
$ pwd
/user/src

 

Change directory to home directory and print working directory:

$ cd ~
$ pwd
/home/user

 

Change directory to parent directory of the home directory and print working directory:

$ cd ~/..
$ pwd
/home

 

Change directory to root directory and print working directory:

$ cd /
$ pwd
/

 


 

See also

© 2017 CalculatorX. All rights reserved.