selinuxexeccon(8)
β¨ selinuxexeccon β the manual page, bestie edition β¨
okay so you found selinuxexeccon, part of the SELinux Command Line documentation situation, and honestly? it's giving one job, done perfectly. section 8 energy, system admin realness, no notes. let's get into it π
π NAME π
selinuxexeccon β report SELinux context used for this executable
like, it tells you which SELinux context a given executable gets run in. that's the whole vibe. short, sweet, iconic π
π¦ SYNOPSIS π¦
selinuxexeccon command [fromcon]
so it's command, and then optionally a fromcon. two things. we love a minimal interface πΈ
π DESCRIPTION π
selinuxexeccon reports the SELinux process context for the specified command, computed from the specified context β or, if you didn't hand it one, from the current context.
basically: "hey, if I run this thing from here, what context am I gonna land in?" and it's like "here bestie, here's your answer" β¨
π EXAMPLE π
run it on a bare command and it reads your current context, no cap:
# selinuxexeccon /usr/bin/passwd
staff_u:staff_r:passwd_t:s0-s0:c0.c1023
and now the upgraded version β you feed it a fromcon and it tells you the context you'd get from there instead:
# selinuxexeccon /usr/sbin/sendmail system_u:system_r:httpd_t:s0
system_u:system_r:system_mail_t:s0
see how the fromcon changed the answer?? that's the whole point of the second argument, and it ate π₯
π AUTHOR π
This manual page was written by Dan Walsh <dwalsh@redhat.com>. legend behaviour fr fr π«Ά
π§ SEE ALSO π§
secon(8)β go read that one too, iykyk
ngl there is no extra secret sauce here β no flags, no env vars, no exit status lore, no bug notes. just a command, an optional context, and the truth. periodt π
and that's the whole page!! this lil beauty came from dwalsh@redhat.com and is dated 14 May 2011 β yeah she's an elder but she's still slaying, we stan a timeless classic πβ bye bestie, go check your contexts π
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-utils 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-utils 3.6-5.el9 Β· Public Domain
- debian bookworm: selinux-utils 3.4-1+b6
- debian trixie: selinux-utils 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-utils 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: selinux-utils 3.3-1build2
- ubuntu noble: selinux-utils 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: selinux-utils 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: selinux-utils 3.8.1-1build1
- ubuntu resolute: selinux-utils 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: selinux-utils 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms