Lynis runs on the host to scan Linux, macOS, and other UNIX systems for hardening gaps, vulnerable packages, and compliance issues.
Overview
Lynis is a security auditing tool for UNIX-based systems including Linux, macOS, BSD variants, and related platforms. It performs an in-depth scan on the machine itself to test defenses, surface configuration weaknesses, and suggest further hardening. Scans also collect general system information, flag vulnerable software packages, and highlight possible misconfigurations.
Typical goals include automated security auditing, compliance checks against frameworks such as ISO27001, PCI-DSS, and HIPAA, and vulnerability detection. The tool can assist with configuration and asset insight, patch awareness, hardening guidance, privilege-escalation review for penetration testing, and intrusion-related checks. System administrators, auditors, security officers, and penetration testers commonly run it.
Scans are modular and opportunistic: Lynis uses only components it finds on the system, so extra agent software is not required. When it detects services such as Apache, it layers additional tests—for example TLS settings and discovered certificates. Hundreds of shell-based checks each have unique identifiers so individual tests can be tuned or disabled. Results appear on screen, in a log file, and in a separate report file for warnings and suggestions.
Installation is optional: many distributions ship packages, and you can also run it directly from a cloned tree with a single audit command. Optional plugins extend testing and collect more host data for larger fleets.
Key features
- Host-based security scanning
- Compliance framework checks
- Vulnerable package detection
- Modular opportunistic tests
- Per-test enable and disable
- Optional plugin extensions
- Shell audit with unique test IDs
- Agentless on-system execution
Use cases
- Daily server health audits
- PCI and HIPAA compliance checks
- System hardening review
- Pre-deployment image testing
- Penetration test preparation