Skip to content

How to disable SELinux on Rocky, Alma, Oracle Linux 8 and 9

If you want to demonstrate how to disable SELinux or set it to permissive mode here are the simple steps to perform.

Please note: This post assumes that you have nano (text editor) installed and are logged in via root. if not add sudo wherever elevated privileges are required.

nano /etc/selinux/config

Once the config file opens in nano, find the set the SELinux as below:

Option 1: Disabled:


Option 2: Permissive


What’s the disabled or permissive option about?

Well, I recommend keeping SELinux in permissive mode, so at least it can do logging for what’s going on (Configuration demonstrated in Option 2). If your application requires or demands SELinux to be disabled that you can use Option 1 as stated above.

We use Microsoft Clarity to track usage on this website, by continuing to use this site, you acknowledge the same.