•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

How to disable selinux on Almalinux?

  • Home
  • Client
  • Qa Forum
  • How to disable selinux on Almalinux?

Posted By: Song | 1 Replies | Last Reply On: Oct 21, 2022 12:02:52

How to disable selinux on Almalinux?

Psychz - Pratibha

Votes: 0Posted On: Oct 21, 2022 12:02:52
 

AlmaLinux comes with SELinux (Security Enhanced Linux) installed and enabled by default. Its primary purpose is to enforce the resource policies that define what level of access users, programs, and services have on a system. SELinux is based on the TE principle (Type Enforcement): all resources are assigned to specific domains and access rules are defined on them.

Though, it is good to have security measures for your system, but you may come across situations where some of your important applications don't support SELinux and hence you may want to disable SELinux permanently to avoid termination of any key process on your system.

Follow the steps given below to disable SELinux on your AlmaLinux

To find out the current status of SELinux on your system using the following command

# sestatus

Output

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
Memory protection checking:     actual (secure)
Max kernel policy version:      33

SELinux has three possible modes that you could see when running the command. They are:

Enforcing – SELinux is active and enforcing its policy rules.
Permissive – SELinux permits everything, but logs the events it would normally deny in enforcing mode.
Disabled – SELinux is not enforcing rules or logging anything.

Note: By default, AlmaLinux has SELinux enabled and in enforcing mode.

To disable SELinux permanently on your system, you need to edit the following config file

# vi /etc/selinux/config

Output

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Press 'i' or 'insert' to edit the file. Replace SELINUX=enforcing to SELINUX=disabled

When done, press 'esc' followed by :wq and press enter.

w-write
q-quit

Now reboot the system

# reboot

Once you reboot the system, SELinux will be totally disabled.

Verify that SELinux is permanently disabled.

# getenforce

Output

disabled


You have successfully disabled SELinux in your system. If you wish to enable it in the future, simply change the mode to Enforcing or Permissive editing the config file.

Was this reply helpful?

Related topics

  • How to Disable SELinux?
  • Disable Selinux Centos 7
  • Centos 7 Disable Firewall
  • Deploy Psychz Dedicated Server Using Jenkins Pipeline Scripts
  • Upgrade Centos 6 to Centos 7
  • sBlock - Backup on RHEL, CentOS, AlmaLinux & Rocky Linux
  • How to install Node.js on AlmaLinux 8
  • Red Hat: Not just about Linux anymore!
  • cVirtual Supported Operating System
  • Serious New DDoS Attack Method Surfaces; Threatens Internet Providers, Businesses
  • CDN Hosting and why Every website should utilize a CDN
  • Top Hosting Control Panels For Linux
  • SSH into Docker Container
  • Network Mapping Tools
  • History of Internet
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801