Share your love
Install Chkrootkit on AlmaLinux 9

In this guide, we want to teach you How To Install Chkrootkit on AlmaLinux 9. Chkrootkit is a free and open-source antivirus tool available on GitHub. This tool checks locally in the binary system of your machine and scans your Linux server for a trojan. chkrootkit is a shell script that checks system binaries for rootkit modification. This tool is used for scanning botnets, rootkits, malware, etc.
You can now proceed to the guide steps below on the Orcacore website to set up the Chkrootkit tool on AlmaLinux 9.
Table of Contents
Steps To Install and Use Chkrootkit on AlmaLinux 9
To download Chkrootkit on AlmaLinux 9 and start using it, log in to your server as a root user and follow the steps below.
1. Install Chkrootkit on AlmaLinux 9
By default, chkrootkit packages aren’t available in the default AlmaLinux repository. First, you need to update your local package index with the following command:
dnf update -y
Then, install the required packages on AlmaLinux 9 with the following command:
dnf install wget gcc-c++ glibc -y
Download Chkrootkit
Next, you need to visit the chkrootkit downloads page and download the latest source tarball with the wget command:

wget -c ftp://chkrootkit.org/pub/seg/pac/chkrootkit.tar.gz
Here you need to check that the chkrootkit download has not been tampered with or damaged. For this, you can download the md5 hash file associated with your chkrootkit download using the following command:
wget ftp://chkrootkit.org/pub/seg/pac/chkrootkit.md5
Check the chkrootkit download:
md5sum -c chkrootkit.md5

At this point, you need to extract your chkrootkit downloaded file on AlmaLinux 9 with the command below:
tar -xvzf chkrootkit.tar.gz
Now you need to create a folder and move the extracted contents to the file:
mkdir /usr/local/chkrootkit
To check your chkrootkit file name you can use the ls command and use the command below to move it to your new folder:
mv chkrootkit-0.56/* /usr/local/chkrootkit
Switch to your chkrootkit directory on AlmaLinux 9:
cd /usr/local/chkrootkit
Then, run the make sense command:
make sense
When it is completed, you can start to scan the server.
2. How To Use Chkrootkit on AlmaLinux 9
At this point, you need to scan your AlmaLinux 9 server by running the chkrootkit:
/usr/local/chkrootkit/chkrootkit
To enable automatic scanning, you can automatically add a cron entry for running chkrootkit and send a scan report to your mail address. Create and add the following entries to “/etc/cron.daily/chkrootkit.sh”
#!/bin/sh
(
/usr/local/chkrootkit/chkrootkit
) | /bin/mail -s 'CHROOTKIT Daily Run (ServerName)' your@email.com
These are some commonly used options of chkrootkit:
- -h: Show a short help message and exit.
- -V: Show version information and exit.
- -I: Show available tests and exit.
- -d: Enter debugs mode.
- -x: Enter expert mode.
- -e: Exclude known false positive files/dirs, quoted, space-separated.
- -q: Enter quiet mode. In quiet mode, only output messages with infected status are displayed.
- -r dir: use dir as the root directory.
- -p dir1: Ability to add more binary paths using this option.
- -n: Skip NFS-mounted directories.
Conclusion
At this point, you have learned to Install Chkrootkit on AlmaLinux 9. Chkrootkit is used on AlmaLinux 9 to detect rootkits and hidden security threats. It scans system binaries and logs for signs of malicious activity.
Hope you enjoy it. You may also like these articles:
Install Apache Maven on AlmaLinux 9
How To Install Redis on AlmaLinux 9
How To Set up Bind on AlmaLinux 9
FAQs
What is Chkrootkit?
Chkrootkit is a security tool that scans a Linux system for rootkits, hidden backdoors, and other malware.
How does Chkrootkit work?
It checks system binaries, logs, and hidden files for signs of known rootkits and suspicious activity.