Permissions and owners

The getenforce command

Shows the current SELinux mode: Enforcing, Permissive or Disabled.

Syntax

getenforce

Copy-ready examples

$ getenforceShow the mode

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Permissive only warns, it does not block; Enforcing does block.

Related commands

FAQ

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course