How to Disable the Ubuntu ‘AppArmor’ Security Profile System-Wide

What is AppArmor?

AppArmor (Application Armor) is a critical Linux kernel security module built directly into Ubuntu. It acts as a Mandatory Access Control (MAC) system. Even if an application is running as the “root” administrator, AppArmor can restrict what that application is allowed to do. For example, it can prevent a web browser from reading your personal documents folder, or prevent a database server from executing arbitrary scripts, drastically reducing the damage a hacker can do if an app is compromised.

However, if you are a developer testing highly experimental software, building a custom kernel, or running legacy applications that require incredibly broad system access, AppArmor’s strict profiles will constantly block your software and throw “Permission Denied” errors. In these rare, isolated testing environments, you may need to disable the security module entirely.

How to Disable AppArmor System-Wide

Warning: Completely disabling AppArmor makes your Ubuntu system significantly more vulnerable to attacks. Only do this on offline testing machines, never on a production server.

  1. Open your Ubuntu Terminal (shortcut: Ctrl + Alt + T).
  2. First, stop the AppArmor service from running in the current session:
sudo systemctl stop apparmor.service
  1. Next, disable the service so it doesn’t attempt to load its security profiles on the next boot:
sudo systemctl disable apparmor.service
  1. To ensure the kernel itself does not enforce any leftover MAC rules, you must remove it from the boot parameters. Open your GRUB configuration:
sudo nano /etc/default/grub
  1. Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT. Add the parameter apparmor=0 to the end of the list inside the quotes. It should look something like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=0"
  1. Save the file (Ctrl + O, Enter) and exit nano (Ctrl + X).
  2. Update your bootloader to apply the changes:
sudo update-grub

Finally, restart your computer. When Ubuntu boots back up, the AppArmor security module will be completely disabled at the kernel level, granting all applications unrestricted access based solely on standard file permissions.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.