There are a few ways that I know you can copy the absolute path of a file on a Mac,
1. Using the Terminal and realpath command
Example:% realpath key.pem
/Users/code2care/Desktop/key.pem
As you can see the realpath command followed by the file name gives you the full absolute path of the file along with the file name and extension.
You can make use of the pwd - present working directory command if you want to know the complete path of a directory.

2. Using the Mouse and Keyboard
- Right-Click (Doble-tap or Trackpad if on Macbook) on the file,
- Now as you see the Menu press Option ⌥ Key on your Mac Keyboard,
- Instead of Copy option you should see "Copy filename as Pathname"
- While holding the Option key select the Copy filename as Pathname option,
- The absolute path will get copied on the Clipboard
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!