LinuxCommandLibrary

run_init

Execute programs in a freshly created init namespace

TLDR

Run a script in init context

$ sudo run_init path/to/script
copy
Run script with arguments
$ sudo run_init path/to/script start
copy
Specify context type explicitly
$ sudo run_init -t context_type path/to/script
copy
Dry run to display context without executing
$ sudo run_init -n path/to/script
copy

SYNOPSIS

run_init [options] script [args...]

DESCRIPTION

run_init runs init scripts in the proper SELinux context. It ensures system service scripts execute with correct SELinux domains for security policy compliance.
This is typically used when manually running service scripts that would normally be started by the init system.

PARAMETERS

-t, --type context

Specify SELinux context type explicitly
-n, --dry-run
Display context without running script

CAVEATS

Requires SELinux to be enabled. User must have permission to transition to the init context.

HISTORY

Part of policycoreutils, providing SELinux management tools for proper context handling.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community