secon Command Examples

Get the SELinux security context of a file, pid, current execution context, or a context specification. See also: semanage, runcon, chcon. More information: https://manned.org/secon.

secon

secon --pid {{1}}

secon --file {{path/to/file_or_directory}}

secon --link {{path/to/symlink}}

secon {{system_u:system_r:container_t:s0:c899,c900}}