Get Current Directory in Linux

Last updated on Jan 2, 2020 in Linux

When working in command line in Linux, it is not always clear what is the current working directory or path. Or, in case of home folder ~, you sometimes need to know the real path.

Usually there is at least some part of the path visible before the prompt ´$´, for example:

[email protected]:~$

Here the ~ represents the current path, but it does not tell a much details. Also, if the path is very long, only the last directory might be visible here.

Use pwd Command to Get the Current Path

[email protected]:~$ pwd