Microsoft Defender for Endpoint
Endpoint protection

Configure and run antivirus scans with Microsoft Defender for Endpoint on Linux

In brief

The documentation now says users need at least Alerts (manage) permission in the Defender portal before beginning. It also simplifies scan performance guidance and clarifies passive-mode wording.

What Defender admins need to know

Verify that administrators running these procedures have the required permission.

Summaries are generated from the documentation change itself.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

Configure and run antivirus scans with Microsoft Defender for Endpoint on Linux

Scan type Description
Quick scan (recommended) A quick scan examines locations where malware is likely to be registered and executed, such as startup scripts, cron jobs, and system service directories (for example, /etc/rc.local, /etc/init.d/, and systemd service files). It also checks common directories where malware could reside, such as /tmp, /var, etc. ThisThe list of scanned locations is subject to change based on various factors such as threat landscape or evolving malware techniques.
Full scan A full scan scans all files and folders within /.

A full scan with Defender for Endpoint on Linux can take several hours or even days to complete. The duration depends on the volume and type of data being scanned and the availability of CPU resources.
Custom scan A custom scan runs on files and folders specified with the --path parameter.

By default, custom scans in Defender for Endpoint on Linux ignore files and folders specified in the antivirus exclusions. However, you can override this behavior by using the --ignore-exclusions flag, to ensure the excluded files and folders are scanned during a custom scan.

Run on-demand scans via the Defender portal

Before you begin, ensure you have at least Alerts (manage) permission in the Defender portal.

To trigger an antivirus scan on a device from the Defender portal:

  1. Go to the Microsoft Defender portal (https://security.microsoft.com) and sign-in.

Performance optimizations

Running antivirusAntivirus scans on your device isare crucial for maintaining security, but it's important to balance this with the impact onthey can affect device performance. Naturally, running aA full scan on a device with extensive andlarge or complex content results in higheruses more system resource usageresources and takes longer completion times.to finish.

Various antivirusYou can adjust settings and configurations can influence bothto balance performance and protection levels.protection. To enhance theimprove scan performance ofin Microsoft Defender for Endpoint on Linux during antivirus scans,Linux, consider adjustingchanging the following settings and switches:settings:

Flag Description
Scan after definitions update This setting determinesControls whether to start a process scan runs after new security intelligence updates are downloaded ondownload to the device. When enabled, it initiates an antivirus scan on the device'sscans active processes.
Scan archives (on-demand antivirus scans only) This setting specifiesControls whether to scan archivesarchive files (such as .zip, .rar, .7z, etc.) during on-demand antivirus scans.
Maximum on-demand scan threads This setting controlsSets how many threads are used forrun on-demand scans, impacting bothscans. More threads use more CPU usage and the scan's duration.but finish faster.

For detailed instructions on configuring scan-after-definition-update, archive scanning, and maximum on-demand scan threads using CLI or managed JSON, see Configure security settings in Microsoft Defender for Endpoint on Linux.

Best practices

Starting from version 101.23062.0001, Defender for Endpoint on Linux operates in passive mode by default, meaning real-time protection (RTP) is turned off. In thispassive mode, it's recommended to use scheduled scans as needed to ensure the system is periodically protected.

After installing Defender for Endpoint on Linux, it's a good practice to run a full scan (or a quick scan) to help identify and remediate any existing threats on the system.