Sodamhan.com

TL;DR

runcon

Run a program in a different SELinux security context. See also: secon. More information: https://www.gnu.org/software/coreutils/runcon.

  • Print the security context of the current execution context:

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

This document was created using the contents of the tldr project.