What the adb: command not found Error Means
The error adb: command not found (on Windows: 'adb' is not recognized as an internal or external command...) means your operating system cannot find the Android Debug Bridge (ADB) utility executable file in the directories listed in the system PATH variable.
The full error text may look like this:
- Windows (CMD/PowerShell):
'adb' is not recognized as an internal or external command, operable program or batch file. - macOS/Linux (Bash/Zsh):
bash: adb: command not found - In an IDE (Android Studio, VS Code): Error launching external command.
This error occurs at the moment you attempt to run any ADB command (adb devices, adb install, adb shell, etc.) from any location in the terminal except the folder where the adb executable file is located.
Causes
- ADB is not installed. The
platform-toolspackage containingadb.exe(Windows) or justadb(macOS/Linux) is missing from your computer. - Installed, but path not added to
PATH. ADB is installed in some folder (e.g.,C:\Users\Name\AppData\Local\Android\Sdk\platform-tools), but this folder has not been added to the systemPATHvariable. Therefore, the terminal does not know where to look for the executable. - Terminal/session not restarted. The path was added to
PATH, but the current terminal window was opened before this change. New sessions will see the updatedPATH, but the old one will not. - Corrupted installation. The
adbfile is missing or corrupted in theplatform-toolsfolder. - Permissions conflict (Windows). Attempting to run
adbfrom a system folder (e.g.,C:\Program Files) without administrator rights may be blocked.
Solutions
Method 1: Download and Add Platform-Tools to PATH (Recommended)
This is the correct and universal method, making the adb command available from anywhere.
- Download Platform-Tools.
- Go to the SDK Platform Tools page on the Android Developers website.
- Select the archive for your OS (Windows, macOS, Linux) and download it.
- Extract the archive.
- Create a simple folder without spaces or Cyrillic characters, for example:
- Windows:
C:\adborC:\platform-tools - macOS/Linux:
~/adbor~/platform-tools
- Windows:
- Extract the contents of the downloaded archive (files like
adb,adb.exe,fastboot, etc. should appear) into this folder.
- Create a simple folder without spaces or Cyrillic characters, for example:
- Add the path to the
PATHvariable.- For Windows 10/11:
- Press
Win + R, typesysdm.cpl→ go to the «Advanced» tab → «Environment Variables». - In the «System variables» (or «User variables») section, find the
Pathvariable, select it, and click «Edit». - Click «New» and add the full path to your folder (e.g.,
C:\adb). - Click «OK» in all windows.
- Press
- For macOS (zsh shell is default):
- Open Terminal.
- Run
open ~/.zshrc(oropen ~/.bash_profilefor bash). - At the end of the file, add the line:
export PATH=$PATH:~/adb - Save the file and close the editor.
- Run
source ~/.zshrc(orsource ~/.bash_profile) to apply the changes in the current session.
- For Linux (bash/zsh):
- Open Terminal.
- Run
nano ~/.bashrc(or~/.zshrc). - Add this line to the end of the file:
export PATH=$PATH:$HOME/adb - Press
Ctrl+X, thenY, andEnterto save. - Run
source ~/.bashrc.
- For Windows 10/11:
- Verify the installation.
- Open a NEW terminal or command prompt window.
- Enter the command:
adb version - You should see a version number (e.g.,
Android Debug Bridge version 1.0.41). If yes — the problem is solved.
Method 2: Run ADB from the platform-tools folder (Temporary solution)
If you need to use ADB urgently but don't want to configure PATH.
- Navigate to the folder where you extracted
platform-tools.# Windows (CMD) cd C:\adb # macOS/Linux cd ~/adb - Run commands by explicitly specifying
adb:
Disadvantage: Inconvenient; you must change to the folder each time or write the full path../adb devices # For macOS/Linux adb.exe devices # For Windows (in the same folder)
Method 3: Installation via Package Manager (for macOS/Linux)
If you use Homebrew (macOS) or your distribution's package manager (Linux), this is the simplest method.
- macOS (Homebrew):
Homebrew automatically adds the path tobrew install android-platform-toolsPATH. - Ubuntu/Debian:
sudo apt update sudo apt install android-tools-adb android-tools-fastboot - Arch Linux:
sudo pacman -S android-tools
After installing via a package manager, the adb command is usually available immediately. Check with adb version.
Method 4: Reinstall via Android Studio (if already installed)
If you have Android Studio installed, the SDK (and platform-tools) might already be present, but the path is not set.
- Launch Android Studio.
- Go to
File→Settings(Windows/Linux) orAndroid Studio→Settings(macOS). - In the left menu, select
Appearance & Behavior→System Settings→Android SDK. - On the
SDK Toolstab, findAndroid SDK Platform-Tools. If unchecked — install it. If checked — click «Apply», then «OK» to reinstall. - Note the SDK path (shown on the
Android SDKtab at the top of the window, typicallyC:\Users\Name\AppData\Local\Android\Sdk). - Add the path
...\Sdk\platform-toolsto thePATHvariable, as described in Method 1.
Prevention
- Always use official sources. Download
platform-toolsonly from the Android Developers website or through official package managers (Homebrew, apt). This ensures an up-to-date and secure version. - Configure
PATHcorrectly once. After properly setting thePATHvariable, you won't encounter this issue when updating ADB — simply replace the files in theplatform-toolsfolder with new ones. - Check
PATHafter changes. After adding a new path, always open a new terminal window to verify. The commandecho %PATH%(Windows) orecho $PATH(macOS/Linux) will show the current list of directories. - Use isolated environments. For different projects requiring different ADB versions, you can use tools like
sdkman(for Linux/macOS) or simply keep multipleplatform-toolsfolders and switch between them by changingPATHor creating aliases. - Do not place platform-tools in system folders. Folders like
C:\Program Filesmay require administrator rights to write to, complicating updates. It's better to useC:\adbor the user's home directory.