LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

getenforce

SELinux enforcement mode checker

TLDR

Print SELinux mode: Enforcing, Permissive, or Disabled
$ getenforce
copy

SYNOPSIS

getenforce

DESCRIPTION

getenforce displays the current mode of SELinux (Security-Enhanced Linux). The command outputs one of three possible values:Enforcing - SELinux security policy is enforced. Access violations are blocked and logged.Permissive - SELinux security policy is not enforced but violations are logged. Useful for troubleshooting and policy development.Disabled - SELinux is completely disabled.This is a quick way to check SELinux status without parsing configuration files or using more verbose tools like sestatus.

INSTALL

sudo apt install selinux-utils
copy
sudo dnf install libselinux-utils
copy
sudo apk add libselinux-utils
copy

CAVEATS

Returns "Disabled" if SELinux is not compiled into the kernel or if it was disabled at boot. The mode can be changed at runtime with setenforce (between Enforcing and Permissive only), but changing to/from Disabled requires a reboot.

HISTORY

getenforce is part of the SELinux project, which was developed by the NSA (National Security Agency) and released as open source in 2000. It was integrated into the Linux kernel in version 2.6 in 2003 and became the default security module for Red Hat Enterprise Linux and Fedora.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid