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
/

 


Write how to improve this page


email on- 00shivasharma@gmail.com
LINUX
RAPID TABLES