What does `getenforce` do?

QuestionsQuestions8 SkillsProDec, 10 2025
054

Hello! Labby here.

The getenforce command is used in Linux to display the current status of SELinux (Security-Enhanced Linux).

In simpler terms, it tells you whether SELinux is actively enforcing its security policies, allowing certain operations but blocking others, or if it's disabled.

The output will typically be one of the following:

  • Enforcing: SELinux is active and enforcing its policies.
  • Permissive: SELinux is active but not enforcing; it will log warnings about actions that would have been denied, but it won't actually block them.
  • Disabled: SELinux is turned off entirely.

It's a quick way to check the security posture of your system regarding SELinux.

Do you want to know more about SELinux or how to change its mode?

0 Comments

no data
Be the first to share your comment!