adb 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
adb: command not found means your shell cannot locate the Android Debug Bridge executable. In practice, that usually means one of two things: platform-tools is not installed, or it is installed but the platform-tools directory is not on your shell PATH.
What adb actually is
adb is shipped with the Android SDK platform-tools package. It is not a built-in operating-system command, so the terminal only finds it if:
- the binary exists on disk
- your shell knows where to look for it
On most systems, the executable lives in an Android SDK directory under platform-tools.
First check: is adb installed
The quickest check is to look for the binary directly.
If that prints nothing, search for the platform-tools directory.
If you cannot find it anywhere, install Android SDK platform-tools through Android Studio's SDK Manager or the standalone platform-tools package.
Add platform-tools to PATH
Once you know the directory, add it to your shell configuration.
A common macOS or Linux example for zsh is:
Put those lines in ~/.zshrc, then reload the shell.
If you use a different SDK location, substitute the correct path. On Linux the SDK is often under $HOME/Android/Sdk.
Typical Windows location
On Windows, the same idea applies, but you update the system Path in Environment Variables and point it to a directory such as:
After updating the environment variables, open a new terminal window and run adb version again.
Android Studio versus shell environment
A common source of confusion is that Android Studio can find the SDK while your terminal cannot. IDEs often know the SDK path from their own settings, but your shell still depends on PATH.
So "it works in Android Studio" does not prove your terminal is configured correctly.
Verify the fix
After updating PATH, confirm both that the command resolves and that the daemon can talk to devices.
If adb version works but adb devices shows nothing, the path problem is fixed and you have moved on to a separate device-connection problem.
A few path-related edge cases
If you use zsh, updating only ~/.bashrc will not help your current shell. Likewise, a terminal already open before the PATH change will keep the old environment until you reload it or open a new session.
It is also worth checking that the executable bit and directory permissions are correct on Unix-like systems if the binary exists but still cannot be executed.
Common Pitfalls
A common mistake is editing the wrong shell startup file. If you use zsh, changing only ~/.bashrc will not help your current terminal setup.
Another issue is adding the SDK root itself to PATH instead of the platform-tools subdirectory. The shell needs the directory that actually contains the adb binary.
It is also easy to forget that existing terminal windows keep the old environment. Open a new shell or reload the config after making changes.
Summary
- '
adb: command not foundusually means platform-tools is missing or not onPATH.' - Install Android SDK platform-tools if the
adbbinary does not exist. - Add the
platform-toolsdirectory, not just the SDK root, to your shellPATH. - Reload the shell and verify with
adb version. - If
adbresolves but devices are missing, the remaining issue is no longer a shell-path problem.

