Move to Linux
Browse guides

Advanced

SELinux and AppArmor

A simple introduction to SELinux and AppArmor, what they protect, and who made them.

What do they do?

SELinux and AppArmor add rules about what programs can access on your computer. This can help limit the damage if a program is attacked or behaves unexpectedly.

For example, a rule could let a program read its own files while blocking access to files it doesn’t need.

You usually don’t need to configure these for everyday use. Your distro may already have one set up for you.

What is SELinux?

SELinux stands for Security-Enhanced Linux. It uses security labels on things like files and programs, then checks rules to decide which actions are allowed.

It was originally developed by the US National Security Agency (NSA), with other contributors, and released as open-source software.

It’s used by distros such as Fedora and Red Hat Enterprise Linux.

More about SELinux (opens in a new tab)

Example distros that use it
Fedora

What is AppArmor?

AppArmor uses sets of rules called profiles. A program’s profile can limit which files it opens and whether it can use the network. Not every program has a profile.

Ubuntu uses it by default.

More about AppArmor (opens in a new tab)

Example distros that use it
UbuntuDebian

Do I need to change anything?

For everyday use, stick with your distro’s defaults. You don’t need to choose between them just to start using Linux.

Last updated