Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article explains how to download and install the Defender for Cloud CLI on supported operating systems.
Download the CLI
The Defender for Cloud CLI is distributed as a standalone executable. Download the binary that matches your operating system and CPU architecture.
| Operating system | Architecture | Download URL |
|---|---|---|
| Windows | x64 (64-bit) | https://aka.ms/defender-cli_win-x64 |
| Windows | x86 (32-bit) | https://aka.ms/defender-cli_win-x86 |
| Windows | ARM64 | https://aka.ms/defender-cli_win-arm64 |
| macOS | Apple silicon (M-series) | https://aka.ms/defender-cli_osx-arm64 |
| macOS | Intel | https://aka.ms/defender-cli_osx-x64 |
| Linux | x64 | https://aka.ms/defender-cli_linux-x64 |
| Linux | ARM64 | https://aka.ms/defender-cli_linux-arm64 |
Set execution permissions (Linux and macOS)
On Linux and macOS, you must grant the downloaded binary permission to run.
From the directory that contains the downloaded file, run:
chmod +x defender
Tip
On macOS, you might see a Developer cannot be verified warning when running the CLI for the first time. To allow the binary, go to System Settings > Privacy & Security, and then select Open Anyway.
Add the CLI to your PATH (recommended)
Adding the CLI to your system PATH lets you run the defender command from any directory.
Linux and macOS
Move the binary to a directory that’s already included in your PATH, such as /usr/local/bin:
sudo mv defender /usr/local/bin/defender
Windows
Create a folder. For example,
C:\tools\defenderMove
defender.exeinto that folder.In Windows Search, select Edit the system environment variables.
Select Environment Variables, then edit the Path variable under System variables.
Add the path to the folder you created. For example,
C:\tools\defenderSave your changes.
Verify the installation
Open a new terminal or command prompt window and run:
defender --version
If the CLI is installed correctly, the command returns the current version.