ArticleslgStudy

computer science

AppArmor

AppArmor is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand AppArmor rather than just read about it. In short: AppArmor ("Application Armor") is a Linux kernel security module that allows system administrators to restrict programs' capabilities with per-program profiles. Profiles can allow capabilities like network access, raw socket access, and the permission to read, write, or execute files on matching paths.

AppArmor — main illustration
AppArmor — illustration

Key takeaways

  • AppArmor belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect AppArmor to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of AppArmor from memory before moving on to harder problems.

Reference excerpt

AppArmor ("Application Armor") is a Linux kernel security module that allows system administrators to restrict programs' capabilities with per-program profiles. Profiles can allow capabilities like network access, raw socket access, and the permission to read, write, or execute files on matching paths. AppArmor supplements the traditional Unix discretionary access control (DAC) model by providing mandatory access control (MAC). It has been partially included in the mainline Linux kernel since version 2.6.36. Canonical has supported the development of AppArmor since 2009.

Details In addition to manually creating profiles, AppArmor includes a learning mode, in which profile violations are logged, but not prevented. This log can then be used for generating an AppArmor profile, based on the program's typical behavior. AppArmor is implemented using the Linux Security Modules (LSM) kernel interface. AppArmor is offered in part as an alternative to SELinux, which critics consider difficult for administrators to set up and maintain. Unlike SELinux, which is based on applying labels to files, AppArmor works with file paths. Proponents of AppArmor claim that it is less complex and easier for the average user to learn than SELinux. They also claim that AppArmor requires fewer modifications to work with existing systems. For example, SELinux requires a filesystem that supports "security labels", and thus cannot provide access control for files mounted via NFS. AppArmor is filesystem-agnostic.

History AppArmor was first used in Immunix Linux 1998–2003. At the time, AppArmor was known as SubDomain, a reference to the ability for a security profile for a specific program to be segmented into different domains, which the program can switch between dynamically. AppArmor was first made available in SLES and openSUSE and was first enabled by default in SLES 10 and in openSUSE 10.1. In May 2005 Novell acquired Immunix and rebranded SubDomain as AppArmor and began code cleaning and rewriting for the inclusion in the Linux kernel. From 2005 to September 2007, AppArmor was maintained by Novell. SUSE is now the legal owner of the trademarked name AppArmor. openSUSE Tumbleweed transitioned from AppArmor to SELinux for new installation since 11 February 2025, openSUSE Leap 16 switched to SELinux by default as well. AppArmor is still available as install-time selection for users who prefer it. AppArmor was first successfully ported/packaged for Ubuntu in April 2007. AppArmor became a default package starting in Ubuntu 7.10. In Ubuntu 8.04 it protected only CUPS by default. As of Ubuntu 9.04 more items such as MySQL had installed profiles. AppArmor hardening continued to improve in Ubuntu 9.10 with profiles for its guest session, libvirt virtual machines, Evince (document viewer), and an optional Firefox profile. AppArmor was integrated into the October 2010, 2.6.36 kernel release. AppArmor has been integrated to Synology's DSM since 5.1 Beta in 2014. AppArmor was enabled in Solus Release 3 on 2017/8/15. AppArmor is enabled by default in Debian 10 (Buster), released in July 2019.

Other systems AppArmor represents one of several possible approaches to the problem of restricting the actions that installed software may take. The SELinux system generally takes an approach similar to AppArmor. One important difference: SELinux identifies file system objects by inode number instead of path. Under AppArmor an inaccessible file may become accessible if a hard link to it is created. This difference may be less important than it once was, as Ubuntu 10.10 and later mitigate this with a security module called Yama, which is also used in other distributions. SELinux's inode-based model has always inherently denied access through newly created hard links because the hard link would be pointing to an inaccessible inode. SELinux and AppArmor also differ significantly in how they are administered and how they integrate into the system. Isolation of processes can also be accomplished by mechanisms like virtualization. In 2007, the Simplified Mandatory Access Control Kernel was introduced. In 2009, a new solution called Tomoyo was included in Linux 2.6.30; like AppArmor, it also uses path-based access control.

See also

Security-Enhanced Linux Systrace

References

External links AppArmor Wiki AppArmor - Ubuntu Wiki SDB:AppArmor - openSUSE Wiki AppArmor - ArchWiki COUNTERPOINT - Novell and Red Hat security experts face off on AppArmor and SELinux SLES 15 SP2 | Security and Hardening Guide | Confining Privileges with AppArmor LKML: Tony Jones: [RFC][PATCH 0/11] security: AppArmor - Overview

Illustrations

AppArmor illustration

Worked examples

Example 1 — a first encounter with AppArmor

Start with the simplest possible case. Write down what AppArmor claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to AppArmor before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about AppArmor ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of AppArmor

In research
AppArmor appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses AppArmor in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
AppArmor is common in secondary-school and first-year university syllabi. It links to neighbouring topics Linux kernel features, Linux security software, so understanding it makes those chapters shorter.
In everyday life
Look for AppArmor outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “AppArmor” →

How to study AppArmor in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what AppArmor means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain AppArmor out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is AppArmor in simple terms?

AppArmor ("Application Armor") is a Linux kernel security module that allows system administrators to restrict programs' capabilities with per-program profiles. Profiles can allow capabilities like network access, raw socket access, and the permission to read, write, or execute files on matching pa…

Why does AppArmor matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study AppArmor?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on AppArmor.

Tags

  • Linux kernel features
  • Linux security software

Keep exploring