cek Apparmor

zgrep CONFIG_LSM= /proc/config.gz

copy

lsm=landlock,lockdown,yama,apparmor,bpf

paste di titik-titik berikut pada file /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet ......"

run ulang grub

sudo grub-mkconfig -o /boot/grub/grub.cfg

install

sudo pacman -S apparmor

enable

sudo systemctl enable --now apparmor.service

cek status

aa-enabled

perlu di reboot ketika baru pertama kali dijalankan

audit (cukup tambah berikut)

audit=1

rerun grub

aktifkan

sudo systemctl enable auditd.service

untuk mendapatkan notifikasi

groupadd -r audit
gpasswd -a username audit

paste kode berikut ke /etc/audit/auditd.conf

log_group = audit

paste kode berikut ke ~/.config/autostart/apparmor-notify.desktop

[Desktop Entry]
Type=Application
Name=AppArmor Notify
Comment=Receive on screen notifications of AppArmor denials
TryExec=aa-notify
Exec=aa-notify -p -s 1 -w 60 -f /var/log/audit/audit.log
StartupNotify=false
NoDisplay=true

cek

sudo aa-notify

install

sudo pacman -S python-notify2 python-psutil

set write cache

sudo vim /etc/apparmor/parser.conf

uncomment write-cache