1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| # 禁用SELinux # setenforce 0 # sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config sed '/Hello/s/$/!/' # 内核层禁用 # grubby --update-kernel ALL --args selinux=0 # 查看是否禁用 # grubby --info DEFAULT index=0 kernel="/boot/vmlinuz-5.14.0-70.13.1.el9_0.x86_64" args="ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rl-swap rd.lvm.lv=rl/root rd.lvm.lv=rl/swap selinux=0" root="/dev/mapper/rl-root" initrd="/boot/initramfs-5.14.0-70.13.1.el9_0.x86_64.img" title="Rocky Linux (5.14.0-70.13.1.el9_0.x86_64) 9.0 (Blue Onyx)" id="0af0a3c0bc4946a6bb4cc8daa8c8a1f7-5.14.0-70.13.1.el9_0.x86_64" # 回滚内核层禁用操作 # grubby --update-kernel ALL --remove-args selinux
|