LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

secon

Display SELinux security contexts

TLDR

Get current execution context
$ secon
copy
Get context of a process
$ secon --pid 1
copy
Get context of a file
$ secon --file path/to/file
copy
Get context of a symlink (don't resolve)
$ secon --link path/to/symlink
copy
Parse a context specification
$ secon system_u:system_r:container_t:s0
copy

SYNOPSIS

secon [options] [context]

DESCRIPTION

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.

PARAMETERS

--pid pid

Get context of specified process
--file path
Get context of file (follows symlinks)
--link path
Get context of symlink (don't follow)

INSTALL

sudo apt install policycoreutils
copy
sudo dnf install policycoreutils
copy
sudo zypper install policycoreutils
copy
nix profile install nixpkgs#policycoreutils
copy

CAVEATS

Requires SELinux to be enabled. File context may differ from actual access context.

HISTORY

Part of libselinux-utils, providing SELinux context inspection tools.

SEE ALSO

runcon(1), chcon(1), semanage(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid