How to Show SELinux Status

Posted on

This is an article¬† which is going to describe the way for showing SELinux status. The most important part is whether or not SELinux has been installed or not in the operating system. After it has been installed, off course the status of the installed SELinux can be displayed. So, without further more explanation, the command for showing SELinux status is ‘sestatus’. Just type the command at the terminal or any Command Line Interface available in the operating system. So, to make it short and brief, below is the command which is needed to be typed :

sestatus

The command itself is executed and the following is the output in general after typing the command :

[root@hostname ~]# sestatus
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 MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[root@hostname ~]#

The above is an output generated after typing the command ‘sestatus’. Moreover, in the manual page of the Linux command, the command itself, ‘sestatus’ is a command for SELinux status tool. The tool itself is a tool which is actually a command typed in the text or text-based command line interface for getting the status of the system which is currently running SELinux.

As shown in the above output of the command ‘sestatus’, the status of SELinux is ‘enabled’. It means, SELinux is currently active in the operating system installed on the machine. And moreover, the mode of the SELinux enabled or activated is in the enforcing mode.

The output of the status of SELinux can be changed or modified whether the SELinux itself is configured to be disabled or furthermore for the mode of currently running SELinux to be changed into a permissive mode. So,the status of SELinux can be enabled or it can be disabled. On the other hand, the mode of the currently running SELinux can also be changed from enforcing to permissive and vice-versa.

One thought on “How to Show SELinux Status

Leave a Reply