Ubuntu - AppArmor - Enable an AppArmor Profile

First, as the profile may have previously been disabled, re-enable the disabled profile by removing the symbolic link to the profile in /etc/apparmor.d/disable/.

sudo rm /etc/apparmor.d/disable/profile.name

Then load the profile using the -a option.

cat /etc/apparmor.d/profile.name | sudo apparmor_parser -a

Disable a profile

The /etc/apparmor.d/disable directory can be used along with the apparmor_parser -R option to disable a profile.

sudo ln -s /etc/apparmor.d/profile.name /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/profile.name