semanage-export(8)
π semanage-export β the tea β
okay bestie, this is the semanage-export page from section 8 of the manual (semanage-export(8), iykyk) and it's literally the "pack up my SELinux mods and send them to my other girl" tool. let's get into it π
β¨ NAME β¨
semanage-export β SELinux Policy Management import tool
yes babes the original says "import tool" on the export page, that's canon, we do not touch it π
π SYNOPSIS π
semanage export [-h] [-S STORE] [-f OUTPUT_FILE]
π¦ DESCRIPTION π¦
so semanage is the girl that lets you configure certain elements of SELinux policy without needing to modify or recompile anything from policy sources. iconic behavior fr fr.
and semanage import + semanage export are the duo that lets you extract the SELinux modifications from one machine and apply them to another. like packing a little suitcase for your policy changes π§³β¨
β οΈ but bestie, listen β this will remove all current semanage customizations on the second machine, because the command list generated bysemanage exportstarts with<command> -Dfor all semanage sub-commands. that's a full reset on the receiving end, no cap. know before you go π
the good news?? you can put a whole group of semanage commands into a file and apply them to a machine in a single transaction. one shot, one vibe, done. π₯
πΈ OPTIONS πΈ
-h,--helpβ show this help message and exit. the "help me bestie" button π«Ά-S STORE,--store STOREβ Select an alternate SELinux Policy Store to manage. pick a different store if you're feeling adventurous β¨-f OUTPUT_FILE,--output_file OUTPUT_FILEβ Output file. where the goods get written π
π EXAMPLE π
Import semanage modifications from another machine
# semanage export -f semanage.mods
# scp semanage.mod remotemachine:
# ssh remotemachine
# semanage import -f semanage.mods
okay yes the export writessemanage.modsand thescpgrabssemanage.modβ that's exactly how it's written in the original, we are simply reporting the lore, not editing it ππ
π SEE ALSO π
selinux(8), semanage(8), semanage-import(8)
π AUTHOR π
This man page was written by Daniel Walsh <dwalsh@redhat.com> β thank you king, we appreciate you π
and that's the whole page babes, sourced from the semanage-export(8) manual dated 20130617. go forth and export responsibly, mwah ππ
π¦ 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 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 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