Security

getenforce

Show the current SELinux enforcement mode.

securitypolicyverify

Additional Notes

getenforce is a security command used to show the current SELinux enforcement mode. It prints the current SELinux mode: Enforcing, Permissive, or Disabled. This is a quick way to verify whether SELinux is active.

Syntax

getenforce [options] [arguments]

Parameters

  • options: Flags that change how getenforce behaves.
  • target: File, user, service, policy, or security object to inspect or modify.
  • value: Security setting, context, key, hash, or policy value.

Common Options

  • --help: Show command help when supported.
  • --version: Show version information when supported.

Examples

getenforce --help
man getenforce

Practical Notes

Options can vary by distribution and package version. Use man getenforce, getenforce --help, or the package documentation for exact syntax.