Skip to content

Instantly share code, notes, and snippets.

@shqear93
Last active June 24, 2024 17:47
Show Gist options
  • Save shqear93/8be4c58adff3c27f53096105e6ca2c7b to your computer and use it in GitHub Desktop.
Save shqear93/8be4c58adff3c27f53096105e6ca2c7b to your computer and use it in GitHub Desktop.
Disable AppArmor completely without breaking snapd
#!/usr/bin/env bash
# It was a nightmare when! aftrer installing docker i couldn't expose any port
# so far because apparmor was preventing docker from controlling the network
# I spent days looking for the solution till I found this documentation <3 :
# https://wiki.debian.org/AppArmor/HowToUse
sudo mkdir -p /etc/default/grub.d
echo 'GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT apparmor=0"' \
| sudo tee /etc/default/grub.d/apparmor.cfg
sudo update-grub
sudo reboot
@l-qing
Copy link

l-qing commented Apr 7, 2024

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment