LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

runcon

Run commands with specified SELinux context

TLDR

Print current security context
$ runcon
copy
Specify domain to run command in
$ runcon -t domain_t command
copy
Specify context role
$ runcon -r role_r command
copy
Specify full context
$ runcon user_u:role_r:domain_t command
copy

SYNOPSIS

runcon [options] [context] command [args...]

DESCRIPTION

runcon runs a program in a different SELinux security context. It allows executing commands with specific SELinux user, role, and type labels.This is useful for testing SELinux policies and running programs in restricted contexts.

PARAMETERS

-u, --user user

Specify SELinux user identity.
-r, --role role
Specify SELinux role.
-t, --type type
Specify SELinux domain/type (requires the same role and user).
-l, --range range
Specify SELinux MLS/MCS level range.
--compute
Compute the target process security context before modifying.
--help
Display help information.
--version
Output version information.

INSTALL

sudo apt install coreutils
copy
sudo dnf install coreutils
copy
sudo pacman -S coreutils
copy
sudo zypper install coreutils
copy
brew install coreutils
copy
nix profile install nixpkgs#coreutils
copy

CAVEATS

Requires SELinux to be enabled. Transitions must be allowed by SELinux policy. Not all context transitions are permitted.

HISTORY

Part of GNU Coreutils, providing SELinux context manipulation for command execution.

SEE ALSO

secon(1), run_init(8), chcon(1)

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