11# Usage
22
3- The ` linux-edr ` command provides the main interface for running and managing the EDR tool .
3+ The Linux EDR tool can be run directly using the Python module .
44
55## Running the Monitor
66
77``` bash
88# Basic monitoring with default settings (requires root)
9- sudo linux-edr run
9+ sudo uv run python -m linux_edr.cli run
1010
1111# Custom 5-minute reporting interval and save reports to a file
12- sudo linux-edr run --interval 5 --output /var/log/linux-edr-events.jsonl
12+ sudo uv run python -m linux_edr.cli run --interval 5 --output /var/log/linux-edr-events.jsonl
1313
1414# Use a specific configuration file
15- sudo linux-edr run --config /etc/linux_edr/my_config.ini
15+ sudo uv run python -m linux_edr.cli run --config /etc/linux_edr/my_config.ini
1616```
1717
1818## Viewing Configuration
1919
2020To see the effective configuration (after loading defaults, file settings, and command-line overrides):
2121
2222``` bash
23- linux-edr show-config
23+ sudo uv run python -m linux_edr.cli show-config
2424
2525# View configuration based on a specific file
26- linux-edr show-config --config /etc/linux_edr/my_config.ini
26+ sudo uv run python -m linux_edr.cli show-config --config /etc/linux_edr/my_config.ini
2727```
2828
2929## Running as a Systemd Service
@@ -34,27 +34,32 @@ Linux EDR can be run as a systemd service for continuous background monitoring:
3434 ``` bash
3535 sudo cp linux-edr.service /etc/systemd/system/
3636 ```
37- * (Note: Ensure the ` linux-edr. service` file is present in your installation or repository. )*
37+ * (Note: The service file is configured to use ` uv run python -m linux_edr.cli run ` command )*
3838
39392. ** Create log directory** (if needed by your service configuration):
4040 ` ` ` bash
4141 sudo mkdir -p /var/log/linux-edr
4242 sudo chown < user> :< group> /var/log/linux-edr # Adjust user/group as needed
4343 ` ` `
4444
45- 3. ** Reload systemd, enable and start the service:**
45+ 3. ** Ensure uv is installed system-wide and available at /usr/bin/uv:**
46+ ` ` ` bash
47+ sudo ln -sf $( which uv) /usr/bin/uv # Create symlink if necessary
48+ ` ` `
49+
50+ 4. ** Reload systemd, enable and start the service:**
4651 ` ` ` bash
4752 sudo systemctl daemon-reload
4853 sudo systemctl enable linux-edr.service
4954 sudo systemctl start linux-edr.service
5055 ` ` `
5156
52- 4 . ** Check service status:**
57+ 5 . ** Check service status:**
5358 ` ` ` bash
5459 sudo systemctl status linux-edr.service
5560 ` ` `
5661
57- 5 . ** View service logs:**
62+ 6 . ** View service logs:**
5863 ` ` ` bash
5964 sudo journalctl -u linux-edr.service -f
6065 ` ` `
0 commit comments