Not able to access adb in OS X through Terminal, command not found
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
When Terminal says adb: command not found, macOS is not finding the Android Debug Bridge executable on your shell path. The fix is usually one of two things: install Android platform-tools if adb is missing, or add the platform-tools directory to PATH if adb already exists on disk.
Verify Whether adb Is Installed
Start by checking whether the binary exists anywhere obvious. If you already have Android Studio or the command-line tools installed, adb is often under the Android SDK directory.
A common location is:
If the search returns nothing useful, install platform-tools first.
Install Android Platform-Tools
If you use Homebrew, installation is simple:
If you use the Android SDK directly, install platform-tools through Android Studio or the SDK manager. Once installed, verify that the binary works by running it with its full path.
If the full path works, the problem is not installation. It is just shell configuration.
Add adb to Your PATH
Modern macOS shells usually use zsh, so the place to configure PATH is often ~/.zshrc.
If you still use bash, add the same line to ~/.bash_profile or ~/.bashrc instead.
You can inspect your current path with:
That helps confirm whether the platform-tools directory is present.
Why the Full Path Works but the Command Fails
The shell searches directories listed in PATH from left to right. If the directory containing adb is not included, typing adb alone cannot succeed even though the file exists.
That is why this works:
while this fails before the path is configured:
It is the same executable. Only the discovery mechanism is different.
Check Permissions and Shell Startup Files
If adb still fails after updating PATH, confirm that you edited the startup file used by your actual shell.
If the shell is /bin/zsh, updating only ~/.bash_profile will not help new zsh sessions. Likewise, if Terminal starts a login shell, one startup file may load while another does not.
Also make sure the adb file is executable:
The output should include execute permission bits.
Test with a Real Device Command
Once adb is on the path, verify the full workflow.
If the command works but shows no devices, the original shell problem is fixed and you can move on to USB debugging, cable, or authorization issues separately.
Common Pitfalls
A common mistake is installing Android Studio and assuming adb is automatically available in every Terminal session. The IDE can use the SDK without your shell knowing where it lives.
Another issue is editing the wrong shell profile file. On modern macOS, ~/.zshrc is the usual choice, not ~/.bash_profile.
Developers also sometimes solve the problem in one Terminal window and forget to reload the shell or open a new session, so the new PATH never takes effect.
Summary
- '
adb: command not foundusually means either missing platform-tools or a missing path entry.' - Check whether
adbexists under the Android SDK or install it with Homebrew or the SDK tools. - Add the platform-tools directory to
PATHin the correct shell startup file. - Reload the shell and verify with
adb version. - Once the command resolves, device-detection problems are a separate issue.

