OtherHigh

adb: command not found — how to fix the error in Windows, macOS and Linux

The article explains why the system does not recognize the `adb` command and cannot find the Android Debug Bridge utility, and provides proven methods for installing and configuring it for Windows, macOS, and Linux.

Updated at February 16, 2026
10-15 minutes
Easy
FixPedia Team
Применимо к:Android SDK Platform-ToolsWindows 10/11macOS 12+Ubuntu 22.04+

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

  1. ADB is not installed. The platform-tools package containing adb.exe (Windows) or just adb (macOS/Linux) is missing from your computer.
  2. 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 system PATH variable. Therefore, the terminal does not know where to look for the executable.
  3. 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 updated PATH, but the old one will not.
  4. Corrupted installation. The adb file is missing or corrupted in the platform-tools folder.
  5. Permissions conflict (Windows). Attempting to run adb from a system folder (e.g., C:\Program Files) without administrator rights may be blocked.

Solutions

This is the correct and universal method, making the adb command available from anywhere.

  1. 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.
  2. Extract the archive.
    • Create a simple folder without spaces or Cyrillic characters, for example:
      • Windows: C:\adb or C:\platform-tools
      • macOS/Linux: ~/adb or ~/platform-tools
    • Extract the contents of the downloaded archive (files like adb, adb.exe, fastboot, etc. should appear) into this folder.
  3. Add the path to the PATH variable.
    • For Windows 10/11:
      1. Press Win + R, type sysdm.cpl → go to the «Advanced» tab → «Environment Variables».
      2. In the «System variables» (or «User variables») section, find the Path variable, select it, and click «Edit».
      3. Click «New» and add the full path to your folder (e.g., C:\adb).
      4. Click «OK» in all windows.
    • For macOS (zsh shell is default):
      1. Open Terminal.
      2. Run open ~/.zshrc (or open ~/.bash_profile for bash).
      3. At the end of the file, add the line:
        export PATH=$PATH:~/adb
        
      4. Save the file and close the editor.
      5. Run source ~/.zshrc (or source ~/.bash_profile) to apply the changes in the current session.
    • For Linux (bash/zsh):
      1. Open Terminal.
      2. Run nano ~/.bashrc (or ~/.zshrc).
      3. Add this line to the end of the file:
        export PATH=$PATH:$HOME/adb
        
      4. Press Ctrl+X, then Y, and Enter to save.
      5. Run source ~/.bashrc.
  4. 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.

  1. Navigate to the folder where you extracted platform-tools.
    # Windows (CMD)
    cd C:\adb
    
    # macOS/Linux
    cd ~/adb
    
  2. Run commands by explicitly specifying adb:
    ./adb devices   # For macOS/Linux
    adb.exe devices # For Windows (in the same folder)
    
    Disadvantage: Inconvenient; you must change to the folder each time or write the full path.

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):
    brew install android-platform-tools
    
    Homebrew automatically adds the path to PATH.
  • 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.

  1. Launch Android Studio.
  2. Go to FileSettings (Windows/Linux) or Android StudioSettings (macOS).
  3. In the left menu, select Appearance & BehaviorSystem SettingsAndroid SDK.
  4. On the SDK Tools tab, find Android SDK Platform-Tools. If unchecked — install it. If checked — click «Apply», then «OK» to reinstall.
  5. Note the SDK path (shown on the Android SDK tab at the top of the window, typically C:\Users\Name\AppData\Local\Android\Sdk).
  6. Add the path ...\Sdk\platform-tools to the PATH variable, as described in Method 1.

Prevention

  • Always use official sources. Download platform-tools only from the Android Developers website or through official package managers (Homebrew, apt). This ensures an up-to-date and secure version.
  • Configure PATH correctly once. After properly setting the PATH variable, you won't encounter this issue when updating ADB — simply replace the files in the platform-tools folder with new ones.
  • Check PATH after changes. After adding a new path, always open a new terminal window to verify. The command echo %PATH% (Windows) or echo $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 multiple platform-tools folders and switch between them by changing PATH or creating aliases.
  • Do not place platform-tools in system folders. Folders like C:\Program Files may require administrator rights to write to, complicating updates. It's better to use C:\adb or the user's home directory.

F.A.Q.

Why does it still say 'command not found' after installing ADB?
Can I use ADB without installing the entire Android Studio?
What to do if the `adb` command only works in one specific folder?
Do I need to restart the computer after installing ADB?

Hints

Determine your current OS and download Platform-Tools
Extract the archive to a convenient location
Add the path to platform-tools to the system PATH variable
Verify the command works
Connect the device and check detection

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community