System Grab Bag

View all TLDR pages from Linux (or from all pages)

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.
  • Determine the current domain:
    runcon
  • Specify the domain to run a command in:
    runcon -t {{domain}}_t {{command}}
  • Specify the context role to run a command with:
    runcon -r {{role}}_r {{command}}
  • Specify the full context to run a command with:
    runcon {{user}}_u:{{role}}_r:{{domain}}_t {{command}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.