How Do I Install Android CLI on My Laptop?
The Android CLI is a small command line tool that manages Android development packages right from your terminal. Instead of downloading an installer, opening it, and clicking through dialogs, you install everything with a single command. This guide walks you through installing it on Linux, Mac, or Windows, and then confirms it is actually working. It is the first step in our distraction free Android guide.
TL;DR: Run one install command for your operating system, restart your terminal, and check with android version.
What You Will Need
A laptop running Linux, Mac, or Windows, with an internet connection. No prior command line experience is required.
Step 1: Install the Android CLI
Open a terminal (or Command Prompt on Windows) and run the command for your operating system.
For Linux
curl -fsSL https://dl.google.com/android/cli/latest/linux_x86_64/install.sh | bash
For Mac
curl -fsSL https://dl.google.com/android/cli/latest/darwin_arm64/install.sh | bash
For Windows
curl.exe -fsSL https://dl.google.com/android/cli/latest/windows_x86_64/install.cmd -o "%TEMP%\i.cmd" && "%TEMP%\i.cmd"
Step 2: Restart Your Terminal
Close the terminal completely and open a fresh one. The installer adds the android command to your system path, and a fresh terminal is what picks that up. On Windows especially, an already open Command Prompt will not see the new command.
Step 3: Verify the Installation
Check that everything landed correctly:
android version
You should see a version number printed. If you do, the CLI is ready. You can also run android --help to see the full list of commands.
Troubleshooting
"android: command not found"
You skipped Step 2, or the install printed an error you missed. Scroll back in your terminal and look for any warnings during installation. Restarting the terminal fixes this in most cases.
Permission denied
On Linux and Mac, the install script writes to your home directory, so it should not need sudo. If you see a permissions error, check that your home directory is writable and that you are not running the terminal as a restricted user.
curl fails or times out
This is usually a network issue. If you are behind a corporate proxy or firewall, configure curl to use it, then run the install command again.
Related: once the CLI is installed, the next step is installing the Android SDK and platform-tools, which is covered in our Android SDK guide.
Comments
Post a Comment