# RHEL8에서 selinux OFF하는방법

<table border="1" id="bkmrk-perplexity%EC%97%90%EC%84%9C-%EC%83%9D%EC%84%B1%ED%95%9C-ai%EC%9D%B4" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>[![image.png](http://igoni.kr/uploads/images/gallery/2026-02/scaled-1680-/TJtimage.png)](http://igoni.kr/uploads/images/gallery/2026-02/TJtimage.png)

</td></tr><tr><td class="align-right">perplexity에서 생성한 AI이미지</td></tr></tbody></table>

기존에는 /etc/selinux/config에서 SELINUX=disabled로 설정했는데 RHEL8에서 해당 파일로 변경시 부팅과정 중에 memory leak이 발생할 수 있어 다른 방법으로 변경하라고 합니다.

1. 기존 절차

```shell
$> cat /etc/selinux/config 

# 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

```

1. 변경절차 (커널 파라미터에서 selinux를 off하도록 설정  
    ```shell
    $> grubby --update-kernel ALL --args selinux=0
    $> cat /etc/default/grub
    ...
    GRUB_CMDLINE_LINUX="resume=123 rhgb quiet selinux=0"
    
    ```

시스템 반영을 위해 재부팅 필요.