lynis is a free, open source compliance & risk management project written in Shell and released under GPL-3.0. It has 16,355 GitHub stars, 1,635 forks and 224 open issues, and was last pushed 25 hours ago. On this registry it ranks #3 of 45 tracked projects in Compliance & Risk Management, with 5 head-to-head comparisons available. It gained 14 stars over the last 3 tracked days.

What is lynis?

Lynis is an agentless, GPL-3.0 security auditing and hardening tool that runs on the UNIX-based system itself, built for system administrators, auditors, security officers, and penetration testers who need to assess security defenses and test compliance against standards such as ISO27001, PCI-DSS, and HIPAA.

What it is

Lynis is a security auditing tool for systems based on UNIX, including Linux, macOS, BSD, and others. It performs an in-depth security scan and runs on the system itself rather than reaching across the network from a separate host. The primary goal is to test security defenses and provide tips for further system hardening, and it also scans for general system information, vulnerable software packages, and possible configuration issues. Installation is optional and the tool is agentless, so nothing has to be permanently deployed on the audited machine.

The concrete problem it solves is the absence of a repeatable, inspectable way to know how well a UNIX system is defended. Lynis was commonly used by system administrators and auditors to assess the security defenses of their systems, and it has since been adopted by penetration testers as well. Rather than relying on manual review of configuration files and running services, the tool automates the audit and produces hardening suggestions tied to real findings. It also serves compliance work: the topics list covers auditing, compliance, GDPR, HIPAA, and PCI-DSS alongside hardening and security scanning.

Key capabilities

  • Automated security auditing through a command-line scan invoked as ./lynis audit system.
  • Compliance testing for frameworks named in the goals, including ISO27001, PCI-DSS, and HIPAA, with GDPR and PCI-DSS also present in the topic list.
  • Vulnerability detection, including scanning for general system information, vulnerable software packages, and possible configuration issues.
  • Support for configuration and asset management and software patch management as secondary uses listed alongside the main goals.
  • System hardening guidance, with the primary goal stated as providing tips for further system hardening.
  • Penetration testing support focused on privilege escalation, plus intrusion detection assistance.
  • Extensibility through the Lynis software development kit, lynis-sdk, for building custom tests.

Who uses it and how

  • System administrators use it to assess the security defenses of servers they already operate, running the scan locally on the host.
  • Auditors and security officers use it for compliance testing against ISO27001, PCI-DSS, and HIPAA, and it carries GDPR among its topics.
  • Penetration testers use it in their toolkit for privilege escalation checks, a use the README names explicitly alongside the traditional blue team audience.
  • Security professionals and DevOps teams, per the topic list, run it as part of hardening and scanning workflows.
  • Because it is agentless and installation is optional, it suits one-off audits as well as repeated scans; the README states the software is used by thousands every day to protect their systems.

Getting started

The fastest route for the latest development code is git clone https://github.com/CISOfy/lynis, followed by cd lynis && ./lynis audit system; no compilation or installation is required. For production use, the preferred method is a software package, with the project publishing RPM and DEB packages from the CISOfy repository for CentOS, Debian, Fedora, OEL, openSUSE, RHEL, Ubuntu, and others.

How it compares

No paid products or competing tools are named in the facts provided, so Lynis stands alone in this registry. There is no basis in the available facts for contrasting it with commercial alternatives on licence, hosting model, or pricing.

When to use it — and when not to

Lynis fits teams that want a locally executed, agentless audit with no permanent footprint, and it is licensed under GPL-3.0, so the source can be read and changed. A self-hoster must accept the operational detail the README calls out: running the scan as root or with sudo means changing file ownership with chown -R 0:0, otherwise Lynis warns about file permissions because it would otherwise execute files owned by a non-privileged user. One weakness is packaging: some distributions do not provide an up-to-date version, in which case the CISOfy repository, the website tarball, or the latest GitHub release should be used instead. The repository also carries 224 open issues, so the backlog is not trivial, and documentation lives on the external CISOfy site rather than in the repository.

project readme (upstream, from github) — read inline

Linux Security Expert badge Build Status CII Best Practices Documentation

Do you like this software? Star the project and become a stargazer.


lynis

Lynis - Security auditing and hardening tool, for UNIX-based systems.

Lynis is a security auditing tool for systems based on UNIX like Linux, macOS, BSD, and others. It performs an in-depth security scan and runs on the system itself. The primary goal is to test security defenses and provide tips for further system hardening. It will also scan for general system information, vulnerable software packages, and possible configuration issues. Lynis was commonly used by system administrators and auditors to assess the security defenses of their systems. Besides the "blue team," nowadays penetration testers also have Lynis in their toolkit.

We believe software should be simple, updated on a regular basis, and open. You should be able to trust, understand, and have the option to change the software. Many agree with us, as the software is being used by thousands every day to protect their systems.

Goals

The main goals of Lynis include:

  • Automated security auditing
  • Compliance testing (e.g. ISO27001, PCI-DSS, HIPAA)
  • Vulnerability detection

The software (also) assists with:

  • Configuration and asset management
  • Software patch management
  • System hardening
  • Penetration testing (privilege escalation)
  • Intrusion detection

Audience

Typical users of the software:

  • System administrators
  • Auditors
  • Security officers
  • Penetration testers
  • Security professionals

Installation

There are multiple options available to install Lynis.

Software package

For systems running Linux, BSD, and macOS, there is typically a package available. This is the preferred method of obtaining Lynis, as it is quick to install and easy to update. The Lynis project itself also provides packages in RPM or DEB format suitable for systems systems running: CentOS, Debian, Fedora, OEL, openSUSE, RHEL, Ubuntu, and others.

Some distributions may also have Lynis in their software repository: Repology

Note: Some distributions don't provide an up-to-date version. In that case it is better to use the CISOfy software repository, download the tarball from the website, or download the latest GitHub release.

Git

The very latest developments can be obtained via git.

  1. Clone or download the project files (no compilation nor installation is required) ;

     git clone https://github.com/CISOfy/lynis
    
  2. Execute:

     cd lynis && ./lynis audit system
    

If you want to run the software as root (or sudo), we suggest changing the ownership of the files. Use chown -R 0:0 to recursively alter the owner and group and set it to user ID 0 (root). Otherwise Lynis will warn you about the file permissions. After all, you are executing files owned by a non-privileged user.

Documentation

Have a look at the Lynis documentation to learn more about the configuration and usage of Lynis. When you are interested in reading more articles about Linux security, then check out the Linux security blog named Linux Audit. For some suggestions by Lynis, this is also the source used to learn more about specific findings.

Customization

If you want to create your own tests, have a look at the Lynis software development kit.

Security

We participate in the CII best practices badge program of the Linux Foundation.

Media and Awards

Lynis is collecting some awards along the way and we are proud of that.

Contribute

We love contributors.

Do you have something to share? Want to help out with translating Lynis into your own language? Create an issue or pull request on GitHub, or send us an e-mail: [email protected].

More details can be found in the Contributors Guide.

You can also simply contribute to the project by starring the project and show your appreciation that way.

Thanks!

License

GPLv3

Enterprise version for companies

This software component is also part of an enterprise solution and focuses on companies. Same quality, yet with more functionality.

Focus areas include compliance (PCI DSS, HIPAA, ISO27001, and others). The Enterprise version comes with:

  • a web interface;
  • dashboard and reporting;
  • hardening snippets;
  • improvement plan (based on risk);
  • commercial support.

Frequently asked questions

Is lynis free to use?

lynis is open source under the GPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does lynis do?

Lynis - Security auditing tool for Linux, macOS, and UNIX-based systems. Assists with compliance testing (HIPAA/ISO27001/PCI DSS) and system hardening. Agentles

What is lynis written in?

lynis is primarily written in Shell. Its source is publicly available at https://github.com/CISOfy/lynis, and it has 16,355 GitHub stars.