Installation of Lynis on Arch Linux systems

This article is several years old and might be outdated. It is still available as part of the archive and for historic purposes. Please consider this when using anything from this article.

Tutorial for Lynis installation on Arch Linux

Pacman

Arch Linux is getting more popular due to its great community support and the way it is organized. Being a “rolling release” system, it is continuously up-to-date. Still, you want to make sure your security defenses are equally up-to-date, so that’s where Lynis comes in.

Normally pacman is used for installing new packages. Unfortunately, the lynis package does not show up.

# pacman -Ss lynis
# pacman -Ss rkhunter
community/rkhunter 1.4.2-1
    Checks machines for the presence of rootkits and other unwanted tools.

This is because the package is available in AUR, the Arch User Repository and not yet in the community repository. So we can use Yaourt to install Lynis from there.

Using Yaourt and AUR

Yaourt installation

In case you don’t have Yaourt installed, follow the two steps below.

Add to /etc/pacman.conf:

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

Now install Yaourt:

pacman -Sy yaourt

Installation of Lynis

$ yaourt lynis
1 aur/lynis 1.6.2-2 (87)
    Security and system auditing tool to harden Unix/Linux systems
==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3)
==> -------------------------------------------------------
==> 1

That’s it! Your package has been installed and it ready to use. Make sure to keeping your packages up to date on a regular basis.

yaourt -Syua

Voting

We love to get Lynis into the community repository, so you can use pacman to install it and keep it up-to-date.

So if you like Lynis, log in at AUR and press the vote button.

With enough votes the package will be promoted to the mainstream software repositories, simplifying the installation even more.

Another option is using the aurvote package.

$ yaourt aurvote
1 archlinuxfr/aurvote 1.6-1
    Tool to vote for favorite AUR packages
2 aur/aurvote 1.6-1 (1239)
    Tool to vote for favorite AUR packages
3 aur/aurvote-git latest-2 (2)
    Vote for your favorite AUR packages (development version)
==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3)
==> -------------------------------------------------------
==>

Relevant commands in this article

Like to learn more about the commands that were used in this article? Have a look, for some there is also cheat sheet available.

Feedback

Small picture of Michael Boelen

This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution.

Mastodon icon