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

directoryfilesfilesystempaths

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?

Best Answer

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.

Related Question