How to show the full path of a file or directory in the terminal?

I need to know how the directory name in order to type it out in the terminal. How do I access the names of directories?

Windows Explorer used to have a title bar with the full path. Can someone please help me figure out how to see the full path of a certain file?


If you are using nautilus to browse your files, you can toggle the navigation bar by pressing Ctrl + L.

If you are using the terminal, just use pwd to know the absolute path of your current location.


To display the full path of a file in the terminal just drag the file's icon into the terminal, and the full path of the file will be displayed enclosed by two apostrophes (single quotation mark characters). It's that simple.

In Ubuntu 20.04 and later drag and drop of files or directories doesn't work from the desktop, but does work in other locations including dragging from the desktop in Files file manager.