Specify the domain to run a command in

runcon

  • Run a program in a different SELinux security context.
    With neither context nor command, print the current security context.
    More information: <https://www.gnu.org/software/coreutils/runcon>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

runcon -t {{domain}}_t {{command}}

click the source code to copy install runcon on any operating system with command-not-found.com