---
name: "is_selinux_enabled"
section: "3"
platform: "linux"
package: "libselinux1-dev"
version: "3.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/is_selinux_enabled"
---

# is\_selinux\_enabled(3)

check whether SELinux is enabled

## NAME

is\_selinux\_enabled - check whether SELinux is enabled

## NAME

is\_selinux\_mls\_enabled - check whether SELinux is enabled for (Multi Level Security) MLS

## SYNOPSIS

**#include \<selinux/selinux.h\>**

**int is\_selinux\_enabled(void);**

**int is\_selinux\_mls\_enabled(void);**

## DESCRIPTION

**is\_selinux\_enabled**() returns 1 if SELinux is running or 0 if it is not.

**is\_selinux\_mls\_enabled**() returns 1 if SELinux is capable of running in MLS mode or 0 if it is not. To determine the policy in use on the system, use [**selinux\_getpolicytype**(3)](/selinux_getpolicytype/3.md).

## SEE ALSO

[**selinux**(8)](/selinux/8.md)
