Linux command
secon 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
secon
Example
secon --pid 1
Example
secon --file path/to/file
Example
secon --link path/to/symlink
Parse
secon system_u:system_r:container_t:s0
说明
secon retrieves and displays SELinux security contexts. It can show the context of the current execution, processes, files, or parse context specifications. Output includes user, role, type, and level components of the SELinux context.
参数
- --pid _pid_
- Get context of specified process
- --file _path_
- Get context of file (follows symlinks)
- --link _path_
- Get context of symlink (don't follow)
FAQ
What is the secon command used for?
secon retrieves and displays SELinux security contexts. It can show the context of the current execution, processes, files, or parse context specifications. Output includes user, role, type, and level components of the SELinux context.
How do I run a basic secon example?
Run `secon` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --pid _pid_ do in secon?
Get context of specified process