$linuxjunkies
>

chkrootkit(8)

Scans the system for signs of rootkit infection and suspicious files.

UbuntuDebianFedoraArch

Synopsis

chkrootkit [-h] [-V] [-l] [-d] [-q] [-x] [-r ROOTDIR] [TESTS]

Description

chkrootkit is a shell script that locally scans for signs of a rootkit or other malicious software on a Linux system. It checks for suspicious files, processes, network connections, and kernel-level anomalies that typically indicate system compromise.

The tool examines system binaries, looks for hidden processes, checks for sniffer interfaces, and searches for known rootkit signatures in common system locations. Results are printed with color-coded output indicating what was found (infected, not found, or clean).

Common options

FlagWhat it does
-hdisplay help message and exit
-Vprint version number and exit
-llist available tests without running them
-ddebug mode; shows verbose output during scanning
-qquiet mode; only show warnings and infected files
-xuse chkdirs, chkfiles, and strings checks; slower but more thorough
-r ROOTDIRscan alternate filesystem root instead of / (useful for mounted partitions)
-e TESTNAMEexclude a specific test from running

Examples

Run a complete rootkit scan with default settings

sudo chkrootkit

Scan quietly, showing only suspicious files and warnings

sudo chkrootkit -q

List all available tests without executing them

sudo chkrootkit -l

Scan an external or mounted filesystem at /mnt/external

sudo chkrootkit -r /mnt/external

Run with debug output and save results to a log file

sudo chkrootkit -d 2>&1 | tee scan.log

Run thorough scan and show only lines matching INFECTED

sudo chkrootkit -x | grep INFECTED

Related commands