selinuxenabled(8)

✨ selinuxenabled(8) ✨

okay bestie, so this is a lil page from the SELinux Command Line documentation set πŸŽ€ and honestly? it's the most no-nonsense, one-job-and-she-does-it icon in the whole toolbox πŸ’…


🌸 NAME 🌸

selinuxenabled β€” it's the tool you use inside shell scripts to figure out whether SELinux is enabled or not πŸ¦‹

πŸ’– SYNOPSIS πŸ’–

selinuxenabled

that's it. no flags. no arguments. she said zero options, maximum clarity ✨

🧚 DESCRIPTION 🧚

It tells you whether SELinux is enabled or disabled. That's the whole vibe. It doesn't print anything, it doesn't lecture you, it just indicates the state and dips πŸ’«

πŸ‘‘ EXIT STATUS πŸ‘‘

okay this is the actual main character part, because in script-land your exit status is your entire personality:

  • exits with status 0 if SELinux is enabled πŸŽ‰
  • exits with status 1 if SELinux is not enabled πŸ’€
bestie listen. it's 0 for yes, 1 for no. that's the classic shell "truthy" arrangement, so you can just slam it straight into an if and let it cook πŸ“

🌈 AUTHOR 🌈

Dan Walsh, <dwalsh@redhat.com> β€” shoutout to the legend, we love her 🫢

⭐ SEE ALSO ⭐

like obviously go read getenforce(8) next if you want the actual answer printed at you instead of just an exit code πŸ™ˆ


and that's the whole page, fr fr β€” no cap, it was written by dwalsh@redhat.com back on 7 April 2004, and it's still out here being selinuxenabled(8) in the SELinux Command Line documentation. iconic behavior only πŸ‘‘πŸ’–βœ¨