Atlantic.Net Blog

How to Install and Use AIDE in Debian 10

AIDE is an advanced intrusion detection system that protects a system against viruses, rootkits, malware, and unauthorized activities. It is a host-based file and directory integrity checker that compares the system files information and attributes with a database initially created by AIDE. Whenever someone makes any changes to your system, AIDE compares the database against the real status of the system and reports it to you.

In this post, we will show you how to install and use AIDE on Debian 10.

Step 1 – Install AIDE

By default, AIDE is available in the Ubuntu 20.04 default repository. You can install it using the following commands:

apt-get update -y

apt-get install aide -y

After the installation, you can verify the AIDE version with the following command:

aide -v

Sample output:

Aide 0.16.1

Compiled with the following options:

CONFIG_FILE = "/dev/null"

Step 2 – Initialize AIDE Database

Before starting, you will need to create a new AIDE database. You can create it with the following command:


This will creates a new database at /var/lib/aide/

Running aide --init...
Start timestamp: 2021-07-13 08:53:19 +0000 (AIDE 0.16.1)
AIDE initialized database at /var/lib/aide/
Verbose level: 6

Number of entries:	37719

The attributes of the (uncompressed) database(s):

  RMD160   : EKLJYOgQoxA1T1rDaDwSKPT+zS8=
  TIGER    : ++cPjPggEXIiZPv7/6wxgVw50ddXpE3g
  SHA256   : pa9MXZXSt0Oq80rSeYry1IA6u48mAJ65
  SHA512   : sgB/1IhSDZAjJ8kPEbANX0EVc1v/M4BA
  CRC32    : R/I+2g==
  HAVAL    : 5shLpFN9owhYyjVC9F822TcVDOkXvhv+
  GOST     : u/AioKKAQNB77sCvgUCzc2fJtYWzsM+W

End timestamp: 2021-07-13 08:54:54 +0000 (run time: 1m 35s)

In order to use the new AIDE database, you will need to copy and replaced it with name aide.db:

cp /var/lib/aide/aide.db{.new,}

Next, rebuild the AIDE configuration file using the following command:


This will create a new configuration file at /var/lib/aide/aide.conf.autogenerated.

Next, copy the new configuration file to the default AIDE config directory:

cp /var/lib/aide/aide.conf.autogenerated /etc/aide/aide.conf

Step 3 – Verify AIDE

At this point, AIDE is installed and configured. Now, it’s time to check whether AIDE works or not.

To do so, create some files inside /etc directory with the following command:

echo "How to Install AIDE" > /etc/test
touch /etc/file1.txt

Next, run the AIDE check on /etc directory to detect new files:

aide -c /etc/aide/aide.conf --limit /etc --check

You should see the changes detected by AIDE in the following output:

End timestamp: 2021-07-13 08:57:42 +0000 (run time: 0m 11s)
root@debian10:~# echo "How to Install AIDE" > /etc/test
root@debian10:~# aide -c /etc/aide/aide.conf --limit /etc --check
Start timestamp: 2021-07-13 08:58:35 +0000 (AIDE 0.16.1)
AIDE found differences between database and filesystem!!
Limit: /etc | Verbose level: 6

  Total number of entries:	37721
  Added entries:		2
  Removed entries:		0
  Changed entries:		1

Added entries:

f++++++++++++++++: /etc/file1.txt
f++++++++++++++++: /etc/test

Changed entries:

f >b... mc..C.. .: /etc/aide/aide.conf


If you want to add a new file definition to the AIDE database, run the following command:

aide --update

In order to use the new database for future scans, rename the newly created database to /var/lib/aide/aide.db.gz:

mv /var/lib/aide/  /var/lib/aide/aide.db.gz

Step 4 – Configure AIDE to Alert via Email

You can also configure AIDE to send a daily report by email. You can do it by editing the file /etc/default/aide:

nano /etc/default/aide

Find the following line:


And, replace it with the following line:

[email protected]

Save and close the file, then edit the /etc/aliases file:

nano /etc/aliases

Add the following line:

root:   [email protected]

Save and close the file, then update the aliases with the following command:



In the above guide, you learned how to install and use AIDE on Debian 10. You can now implement AIDE in the production server to protect it from viruses, rootkits, and malware – you can use AIDE on your dedicated server from Atlantic.Net.

Get a $250 Credit and Access to Our Free Tier!

Free Tier includes:
G3.2GB Cloud VPS a Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year