What is adb

adb (Android Debug Bridge) is a command-line tool that lets your computer communicate with your phone — to install apps, run commands or debug. See What is adb? for more details.

adb and fastboot usually come together: either as packages from your Linux distribution, or in a single download called Platform Tools.

Install adb and fastboot on your PC

Tip: Windows users: follow the Windows guide instead.

The simplest way is to install the packages provided by your distribution:

Ubuntu / Debian:

sudo apt update
sudo apt install adb fastboot

Fedora:

sudo dnf install android-tools

The android-tools package provides both adb and fastboot. On other distributions, look for a package named android-tools or android-tools-udev.

Tip: Distro packages can occasionally lag behind the latest adb release. If a device or command misbehaves, try the official Platform Tools (Option B).

Option B — official Android Platform Tools

If the packages above are unavailable or too old, download the official Platform Tools from developer.android.com (link: Download SDK Platform-Tools for Linux).

  1. Extract the downloaded .zip file. This guide assumes you extracted it to your home directory, giving you a ~/platform-tools folder.

  2. Open a terminal in that folder and run the tools from there:

    cd ~/platform-tools
    ./adb devices
    ./fastboot devices
    
  3. Optional — to run adb and fastboot from any folder, add them to your PATH. Add this line to the .bashrc file in your home directory (press Ctrl+H in your file manager to show hidden files):

    export PATH="$HOME/platform-tools:$PATH"
    

    Then open a new terminal: adb devices and fastboot devices work from anywhere.

Enable USB debugging on the phone

The phone must allow adb connections before your PC can see it:

  1. On the phone, open Settings → About phone and tap Build number 7 times. A message confirms that developer mode is enabled.

  2. Go back to Settings → System → Developer options and enable USB debugging.

  3. Connect the phone to the PC with a USB cable.

  4. A popup appears on the phone: Allow USB debugging? Tick Always allow from this computer and tap OK to authorize your computer.

    Allow USB debugging popup on the phone

Verify the connection

On the PC, run:

adb devices

You should see your device serial number followed by device:

List of devices attached
ABC123XYZ    device

If the list is empty, check the USB cable, and that USB debugging is still enabled on the phone. On some distributions you may also need to add your user to the plugdev group (sudo usermod -aG plugdev $USER, then log out and back in) for the device to be detected.