Check SELinux status with sestatus
In this step, you will learn how to check the status of SELinux on your system. SELinux (Security-Enhanced Linux) is a security mechanism that provides mandatory access control (MAC) for processes and resources. It adds an extra layer of security on top of the traditional discretionary access control (DAC).
To check the current status of SELinux, we use the sestatus
command. This command provides a summary of the SELinux configuration and its current state.
Open your terminal if it's not already open. You can do this by clicking the Xfce Terminal icon on the left side of your desktop.
Now, type the following command into the terminal and press Enter:
sestatus
You should see output similar to this:
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy version: ...
Policy load time: ...
Let's break down the important parts of the output:
SELinux status
: Indicates whether SELinux is enabled or disabled on the system.
Current mode
: Shows the current operating mode of SELinux. Common modes are enforcing
, permissive
, and disabled
.
Mode from config file
: Shows the mode that is set in the SELinux configuration file (/etc/selinux/config
).
In this output, SELinux status: enabled
means SELinux is active, and Current mode: enforcing
means SELinux is actively enforcing its security policies.
Understanding the SELinux status is the first step in managing its behavior.
Click Continue to proceed to the next step.