Thursday, February 4, 2021

All 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
/

No comments:

Post a Comment

 https://www.linkedin.com/pulse/building-real-time-database-monitoring-dashboard-oracle-khaleeq-tpwxf/