semanage(8)
๐ semanage(8) โ SELinux Policy Management tool ๐
okay bestie, welcome to semanage(8), the manual page for the SELinux Policy Management tool. yes we're doing SELinux today. hydrate first. ๐ฅค
โจ NAME โจ
semanage โ the SELinux Policy Management tool. that's it, that's the whole name, iconic behavior honestly ๐
๐ธ SYNOPSIS ๐ธ
semanage
{import,export,login,user,port,interface,module,node,fcontext,boolean,permissive,dontaudit,ibpkey,ibendport}
... positional arguments:
and here's what each of those little guys does, one by one, no skipping, we don't do that here ๐ซถ
importโ Import local customizationsexportโ Output local customizationsloginโ Manage login mappings between linux users and SELinux confined usersuserโ Manage SELinux confined users (Roles and levels for an SELinux user)portโ Manage network port type definitionsinterfaceโ Manage network interface type definitionsmoduleโ Manage SELinux policy modulesnodeโ Manage network node type definitionsfcontextโ Manage file context mapping definitionsbooleanโ Manage booleans to selectively enable functionalitypermissiveโ Manage process type enforcement modedontauditโ Disable/Enable dontaudit rules in policyibpkeyโ Manage infiniband pkey type definitionsibendportโ Manage infiniband end port type definitions
๐ฆ DESCRIPTION ๐ฆ
so like, semanage is your girl for configuring certain elements of SELinux policy without needing to modify or recompile from policy sources. no rebuilding the whole policy just to tweak a thing, we love a low-effort queen ๐
what does that actually cover? it includes:
- the mapping from Linux usernames to SELinux user identities โ and that mapping is the thing that controls the initial security context assigned to Linux users when they login, plus it bounds their authorized role set
- security context mappings for various kinds of objects, like network ports, interfaces, infiniband pkeys and endports, and nodes (hosts)
- the file context mapping
now here's the part that trips literally everyone, so pay attention bestie ๐
semanage logindeals with the mapping from Linux usernames (logins) to SELinux user identities.semanage userdeals with the mapping from SELinux user identities to authorized role sets. two different mappings. do not mix them up. i will know. ๐ญ
and in most cases? only the former mapping needs to be adjusted by the administrator. the latter one is principally defined by the base policy and usually does not require modification. so like, hands off the second one unless you know what you're doing, fr fr โจ
๐ OPTIONS ๐
-h,--helpโ List help information
๐ SEE ALSO ๐
go read these next, they're the rest of the family, no cap:
selinux(8), semanage-boolean(8), semanage-dontaudit(8), semanage-export(8), semanage-fcontext(8), semanage-import(8), semanage-interface(8), semanage-login(8), semanage-module(8), semanage-node(8), semanage-permissive(8), semanage-port(8), semanage-user(8) semanage-ibkey(8), semanage-ibendport(8),
๐ AUTHOR ๐
this man page was written by Daniel Walsh <dwalsh@redhat.com> and Russell Coker <rcoker@redhat.com>. Examples by Thomas Bleher <ThomasBleher@gmx.de>.
also, straight from the source, verbatim: usage: semanage [-h] โ that's the whole energy. ๐
and that's the page bestie!! ๐ this beauty is dated 20100223 and it lives under the manual section semanage(8). go forth and manage your SELinux policy, you absolute icon, i'm obsessed with you ๐ซถ๐๐ธ
๐ฆ where this page comes from
- centos-stream 10: policycoreutils-python-utils 3.10-2.el10 ยท GPL-2.0-or-later
- centos-stream 10: policycoreutils-python-utils 3.11-1.el10 ยท GPL-2.0-or-later
- centos-stream 9: policycoreutils-python-utils 3.6-7.el9 ยท GPL-2.0-or-later
- centos-stream 9: policycoreutils-python-utils 3.6-9.el9 ยท GPL-2.0-or-later
- debian bookworm: policycoreutils-python-utils 3.4-1 ยท GPL-2.0-or-later
- debian trixie: policycoreutils-python-utils 3.8.1-2 ยท GPL-2.0-or-later
- fedora 43: policycoreutils-python-utils 3.9-5.fc43 ยท GPL-2.0-or-later
- fedora 43: policycoreutils-python-utils 3.9-7.fc43 ยท GPL-2.0-or-later
- fedora 44: policycoreutils-python-utils 3.10-1.fc44 ยท GPL-2.0-or-later
- fedora 44: policycoreutils-python-utils 3.11-2.fc44 ยท GPL-2.0-or-later
- nixos 26.05: selinux-python 3.10
- nixpkgs unstable: selinux-python 3.10
- opensuse-leap 16.0: policycoreutils-python-utils 3.8.1-160000.5.1 ยท GPL-2.0-or-later
- ubuntu jammy: policycoreutils-python-utils 3.3-1 ยท GPL-2.0-or-later
- ubuntu noble: policycoreutils-python-utils 3.5-1 ยท GPL-2.0-or-later
- ubuntu questing: policycoreutils-python-utils 3.8.1-2
- ubuntu resolute: policycoreutils-python-utils 3.9-2 ยท GPL-2.0-or-later
- ubuntu stonking: policycoreutils-python-utils 3.11-2 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms