semanage-export(8)

πŸ“¦
version 3.11 Β· 2 versions
, in centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 by semanage export starts with <command> -D for 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 writes semanage.mods and the scp grabs semanage.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 πŸ’‹πŸ’–