Vimalkumar Velayudhan

Menu

Lynis

Lynis is a security auditing tool for Linux
Repository: https://github.com/CISOfy/lynis

Installation§

Ubuntu 20.04 LTS§

The Lynis package is available in the repositories and can be installed using apt:

sudo apt install lynis

Ubuntu 18.04 LTS§

Reference

Note: These steps are modified from the original instructions on the Lynis website, as I have apt-transport-https installed and translations disabled already.

Import GPG key:

sudo apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys C80E383C3DE9F082E01391A0366C67DE91CA5D5F

Add Cisofy’s repository:

echo "deb https://packages.cisofy.com/community/lynis/deb/ stable main" | \
sudo tee /etc/apt/sources.list.d/cisofy-lynis.list

Install lynis package:

sudo apt update && sudo apt install lynis

Check installed version:

lynis show version

Perform system check§

sudo lynis audit system

Generate HTML report§

sudo lynis audit system | ansi2html -lw > report.html

-l disable word wrap
-w use a white background

Reference


If you have any questions or comments on this post, please send them by email to vimal (at) disroot (dot) org.

If you would like your comment to remain anonymous, please state that in your email. In any case, your email address will not be published.