# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 lynis

查看 lynis 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:lynis
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lynis
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lynis
```

  证据: MacPorts ports tree: security/lynis/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add lynis
```

  证据: Alpine Linux edge package indexes: lynis from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install lynis
```

  证据: Debian stable package indexes: lynis from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install lynis
```

  证据: Fedora Rawhide package metadata: lynis from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#lynis
```

  证据: nixpkgs package indexes: pkgs/by-name/ly/lynis/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S lynis
```

  证据: Arch Linux sync databases: lynis from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install lynis
```

  证据: openSUSE Tumbleweed package metadata: lynis from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:lynis
- **软件包管理器:** Homebrew
- **版本:** 3.1.7
- **来源摘要:** Security and system auditing tool to harden systems
- **主页:** <https://cisofy.com/lynis/>
- **仓库:** <https://github.com/CISOfy/lynis>
- **最后更新:** 2026-06-25T09:58:01Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- lynis (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 3.1.7
## 项目历史与用法

Lynis is an open source Unix-like system security auditing and hardening tool. It gathers security information, runs checks, and reports warnings and suggestions for administrators, auditors, security specialists, and system maintainers.

### 项目历史

The official README traces Lynis development to May 2007, with Michael Boelen as author from 2007 to 2013 and CISOfy carrying development from 2013 onward. The project is GPLv3-licensed, written as shell scripts, and maintained at CISOfy with public development on GitHub.

Lynis was designed to run directly from an unpacked directory as well as from installed packages. Its README and documentation emphasize broad Unix coverage rather than one distribution: Linux, BSD variants, macOS, Solaris, AIX, and related Unix-like systems are all part of the supported-audit story.

The changelog shows ongoing maintenance into the 2020s, with releases adding OS detection, end-of-life databases, malware and file-integrity checks, macOS checks, package-manager checks, and many platform-specific hardening tests.

### 采用历史

Lynis has unusually broad packaging for a security-audit shell tool. The batch package metadata lists Alpine, Homebrew, Debian, Fedora/DNF, MacPorts, Nix, Arch, Ubuntu, and openSUSE/Zypper, while the upstream docs also mention CISOfy package repositories and custom RPM package building.

CISOfy built a commercial ecosystem around the open source tool through Lynis Enterprise, using Lynis scans as the local audit engine while adding centralized reporting, monitoring, compliance features, dashboards, and support. That commercial/open-source split helped keep Lynis relevant both as a package-manager tool and as a managed audit component.

### 使用方式

The common interactive workflow is `lynis audit system`, often run as root for a full audit. The documentation also covers quick or quiet scans, cron jobs, update checks, viewing profiles and settings, and reading `/var/log/lynis.log` after a scan to interpret findings.

Lynis uses profiles as its configuration model. The FAQ says profiles are usually stored in `/etc/lynis` or discoverable with `lynis show profiles`; the default profile warns users to put local changes in `custom.prf` beside `default.prf` rather than editing the default file.

### 为什么软件包爱好者会关心

Lynis matters to package people because it is both a packaged security utility and a package-system inspector. Its checks know about APT/dpkg, RPM/YUM, pacman, zypper, apk, Homebrew, and other platform details, so keeping it current means tracking operating-system churn, package-manager behavior, and hardening expectations across many Unix-like systems.

### 时间线

- 2007: Lynis development begins under Michael Boelen.
- 2013: CISOfy becomes the named development organization.
- 2014: CISOfy software signing key is documented for download verification.
- 2024: Lynis 3.1.x releases add modern OS and platform checks.
- 2026: Lynis 3.1.7 is released with updated end-of-life database entries.

### Related projects

- Lynis Enterprise builds centralized reporting and compliance workflows around Lynis scan data.
- Lynis Collector is an enterprise component for collecting and uploading audit reports in batch.

### 来源

- <https://cisofy.com/documentation/lynis/>
- <https://github.com/CISOfy/lynis>
- <https://raw.githubusercontent.com/CISOfy/lynis/master/CHANGELOG.md>
- <https://raw.githubusercontent.com/CISOfy/lynis/master/FAQ>
- <https://raw.githubusercontent.com/CISOfy/lynis/master/README>
- <https://raw.githubusercontent.com/CISOfy/lynis/master/default.prf>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: default.prf, custom.prf
## 其他软件包管理器记录

- Debian apt - lynis - 3.1.4-1: normalized package name match | Debian stable package indexes: lynis from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | security auditing tool for Unix based systems | https://cisofy.com/lynis/
- Nix - lynis: normalized package name match | nixpkgs package indexes: pkgs/by-name/ly/lynis/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - lynis - 3.0.9-1: normalized package name match | Ubuntu 24.04 LTS package indexes: lynis from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | security auditing tool for Unix based systems | https://cisofy.com/lynis/
- apk - lynis - 3.1.6-r0: normalized package name match | Alpine Linux edge package indexes: lynis from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Security and system auditing tool | https://cisofy.com/lynis/
- apk - lynis-bash-completion - 3.1.6-r0: normalized package name match | Alpine Linux edge package indexes: lynis-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Bash completions for lynis | https://cisofy.com/lynis/
- apk - lynis-doc - 3.1.6-r0: normalized package name match | Alpine Linux edge package indexes: lynis-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Security and system auditing tool (documentation) | https://cisofy.com/lynis/
- dnf - lynis - 3.1.7-2.fc45: normalized package name match | Fedora Rawhide package metadata: lynis from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Security and system auditing tool | https://cisofy.com/lynis/
- pacman - lynis - 3.1.7-1: normalized package name match | Arch Linux sync databases: lynis from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Security and system auditing tool to harden Unix/Linux systems | https://cisofy.com/lynis/
- zypper - lynis - 3.1.7-1.2: normalized package name match | openSUSE Tumbleweed package metadata: lynis from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Security and System auditing tool | https://cisofy.com/lynis/
- MacPorts - lynis: normalized package name match | MacPorts ports tree: security/lynis/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/lynis.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lynis.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
