How to get current directory Linux? You can use the PWD command. It will print the full system path of the current working directory. The PWD command is a command-line utility for printing the current working directory.
Example for get current directory Linux:
pwd

In a bash shell script, you can get the current directory linux by using the code below:
dir=$(PWD)
echo $dir
Linux pwd command – help:

Comments