Which file is used to configure SELinux in Linux?

Subh Singh
Invent the Future

The file is /etc/selinux/config, which is used to configure SELinux in Linux. It helps you set the SELinux mode.

File:

/etc/selinux/config

Example:

If you want to check the SELinux settings in Linux, you can use the following command.

cat /etc/selinux/config

Output:

SELINUX=enforcing
SELINUXTYPE=targeted

Here:

You can use the /etc/selinux/config file to set the SELinux mode in Linux.

  • enforcing follows SELinux security rules.
  • permissive records rule breaks but does not stop actions.
  • disabled turns off SELinux.