(note: I have made no modifications system paths, so these are the defaults set by the OS or perhaps by one or more of the applications i've installed.) Best Answer For those of you looking for an answer years later (Neon, Oxygen). Mar 08, 2016 $PATH is nothing but an environment variable on Linux, OS X, Unix-like operating systems, and Microsoft Windows. You can specify a set of directories where executable programs are located using $PATH. The $PATH variable is specified as a list of directory names separated by colon (:) characters.
Can we set up global ADB on Mac by adding ADB variable environment? I had this question in mind while writing a tutorial on setting up system-wide ADB and Fastboot on Windows. 'ADB command not found' is a common issue for Android users trying to run ADB commands on Mac. Fortunately, there's an easy way to add ADB to a path on Mac by setting up PATH variable in bash profile and enable universally present ADB and Fastboot.
Besides, there's another trick that involves dragging the ‘Platform-tools' folder to the Mac Terminal. Da pong mac os. By doing so, you can immediately trigger ADB and Fastboot and start using commands without adding the folder path manually.
Once you have set up global ADB and Fastboot by adding ADB or Platform-tools to a path via a Bash profile in the Mac Terminal, you'll be able to run ADB commands from any screen.
Set up ADB Path in Mac Terminal Bash Profile
If you want to enjoy global access to the ADB and Fastboot command-line tools right after launching the Mac Terminal, follow the steps described below.
- Download the latest Android SDK Platform-tools that contain ADB and Fastboot drivers for Mac. Extract the downloaded zip to get a folder named ‘platform-tools‘.
- Now open the Home directory on your Mac. If you don't know how to do that, there are 3 ways to open it.
- Press Command+Shift+H on your keyboard.
- Press Command+Shift+G and enter ‘~/'.
- Double-click the Macintosh HD icon on your desktop. Now click Users > Home icon.
- Click on the Go tab in the Finder bar and select Home.
- Create a new folder called ‘android-sdk-macosx‘ in the Home directory. You can rename it as ‘ADB' or ‘AndroidSDK' too if you want.
- Now, right-click on the ‘platform-tools‘ folder icon and select the Copy 'platform-tools' option from the context menu.
- Paste the ‘platform-tools‘ folder in the new folder you created. You can move this folder to any other location where you won't accidentally delete them. I moved it to the root of my Macbook Pro's storage.
- Launch the Mac Terminal app from Finder > Go > Utilities.
- When the Terminal is open, type the following command given below and press the Enter key. In order to avoid typo mistakes, you can simply copy and paste the command into the Terminal window. Just make sure to use the correct path of the ‘platform-tools‘ folder in the command line. You can easily copy the folder path on Mac using the tips in my guide.
- In case you moved ‘platform-tools' to the Home directory, you can use the following command after replacing username with yours.
- Now that the ADB PATH variable has been added to your bash profile, you need to reload it using the following command. Alternatively, you can just close the Terminal window and re-launch it.
- If you want to check the current value of the PATH variable, you can use the following command. Otherwise, just skip to the next step.
- Since you have already added ADB to Path on your Mac, you can start using ADB or Fastboot commands. It's time to verify that you have set up ADB properly on your Mac. Just type
adb
oradb devices
in the Terminal and hit the Enter key. - In case you get the ‘adb: command not found‘ error on your Mac, you might have made some mistake. Try the steps given above again more carefully.
Add Terminal Shortcut to Platform-Tools
Finally, here's the easiest method to add any folder path to the Mac terminal. Just follow the tip described below to get rid of typing the ‘platform-tools‘ folder path in the Mac Terminal every time you have to use ADB and Fastboot commands. It doesn't provide a global or system-wide ADB support as the above method does.
- Open System Preferences on your Mac.
- Click on Keyboard.
- On the next screen, click on Shortcuts and select Services from the left pane.
- Now, look for Files and Folders in the right pane and enable New Terminal at Folder.
- The shortcut will be added to the folder context menu. You can close the System Preferences window.
- Just right-click on the ‘platform-tools‘ folder icon and select the New Terminal at Folder option.
- When the Terminal window is launched, you can run any ADB and Fastboot command directly without typing the folder path.
If you want to learn more about ADB and Fastboot, read my tutorial describing some more ways to install ADB on Mac. You should also check out these ADB Shell commands and other stuff that you can do on your Android device with ADB.
File path is the address or location of a file or folder in a computer's file system. If you are a Mac user, you may need the full path of a file or folder at times. While it's easy to find the path of a file in Mac terminal using drag and drop, there are some more ways to copy file path on Mac OS X Mountain Lion and macOS Catalina and Mojave. You can paste the file path on Mac using Command +V.
I already wrote a detailed tutorial describing 7 ways to find the path of a file and folder on Windows 10. Below, I'll be describing 5 ways to find a file path on Mac. The copied full path of a file will look as shown below:
1. Copy File Path from Mac Context Menu
This is probably the easiest way to copy the path of a file or folder on macOS and is very similar to Shift + Right-click keyboard shortcut on Windows. The Copy path option is hidden by default
- Select a file or folder and perform a right-click.
- When the context menu pops up, press and hold the Option key on the keyboard.
- Copy 'file-name' as Pathname option will appear in the context menu. Just click it to copy the full file path to the clipboard.
2. Find File Paths via Get Info Option
Just like the Properties option on Windows, macOS has an option called Get info in the context menu. Using this option, you can see all information related to any file on your Macintosh computer such as file name, file type, file size, location, and so on.
- Right-click on a file or folder and click the Get info option in the context menu.
- The infobox will pop-up.
- Check the Where label and you will find the path of the file as shown below. You can highlight the path of the file and copy it.
Use this method only if you just want to know the location of a file or folder. You can copy the path of the file but can't use it in the Terminal or a file upload dialog box.
3. Copy File Path via Go to Folder
There is yet another easy way using which you can find and copy the file path on your Mac.
![Mac Mac](https://www.pegaxchange.com/wp-content/uploads/2017/06/3b_terminal_nano_edit_etc_paths_file.png)
Mac Os Versions
- While in Finder, click on the Go option on the taskbar of your Mac.
- Select Go to Folder option.
- You'll see a new pop-up window named Go to Folder.
- Now, you need to drag the file or folder you want to copy the full path of and drag it into the input field that says Enter a path.
- You should now see the full file path in the Go to Folder dialog box.
- Just press Command + C to copy the path of the file to the clipboard. You can now paste the full path of the file anywhere you want.
4. Find the Path of a File in Mac Terminal
Mac Terminal is generally used to execute commands but you can also use to find the path of a file on macOS. Follow these steps to find a file path using the Terminal app on Mac. This method is useful especially if you need to type the full path of a file in a command line.
- Navigate to Finder > Go > Utilities.
- Launch the Terminal app.
- Now, drag the file or folder you want the find the path of and drop it in the Terminal window.
- It'll instantly show you the full path of the file. If the file is located on the desktop, it will show the desktop path. Similarly, if the file is in the Downloads folder, it will show the download folder path the Terminal.
- Just highlight the file path and copy it to the clipboard. The path of the file is ready to be pasted wherever you want.
Don't Miss: How to Run Windows Apps on macOS
5. Create ‘Copy Path' Service in Automator
This method requires a little effort on your part because you need to create an Automator service using Copy to clipboard feature on macOS. Once you have created the service, you'll have a Copy path option in the context menu for all files and folders. As this option will be permanently available in Mac's context menu, it'll really prove very handy if you need to copy the file path on your Mac frequently.
The trick described below might sound a bit geeky to you but believe me you can create the Copy path service easily using my detailed steps.
Neon Path Mac Os Catalina
- Launch the Automator app on your Mac. If you don't know where to find it, try one of the methods described below and double-click the app icon to launch it.
- Click on the File tab in the Finder screen and type 'Automator' in the search bar.
- Click on Go > Utilities and search for Automator.
- Launch Finder and look for Automator under Applications.
- On the next screen, select Service and click on Choose to create a new service.
- In the search input box, type 'Copy to Clipboard'.
- Drag Copy to Clipboard into that into the right pane of the window.
- Now, configure the 2 options under Service receives selected as files or folders and Finder as shown below.
- Finally, click on File > Save and save your newly created service as 'Copy path' or 'Copy path to clipboard'.
Now select any file or folder in Finder and perform a right-click. You'll see a new item called Copy path in the context menu. Clicking this option will copy the full path of a file to the clipboard.
Neon Path Mac Os X
If you use any of the methods listed above, you won't need to type the desktop path or the download folder path of a file manually. In place using the Terminal app to find the path of a file, it's better to create the Copy path service so that the option is always available in the context menu itself.
Mac Os Download
Read Next: 3 Ways to Take Screenshot on macOS